iPremiumZJoin Date: 2012-01-23 Post Count: 6834 |
script.Parent.Touched:connect(function(define)
player = game.Players:GetPlayerFromCharacter(define.Parent)
player.PlayerGui.GUI1.Frame.Visible = true
wait(3)
player.PlayerGui.GUI1.Frame.Visible = false
end) |
|
|
Lemme guess tag script :P |
|
|
script.Parent.Touched:connect(function(define)
if define.Parent:FindFirstChild("Humanoid") then
player = game.Players:GetPlayerFromCharacter(define.Parent)
player.PlayerGui.GUI1.Frame.Visible = true
wait(3)
player.PlayerGui.GUI1.Frame.Visible = false
end
end)
† KMXD † |
|
iPremiumZJoin Date: 2012-01-23 Post Count: 6834 |
nope. Just something secret, for a secret project, secretly, in secret. |
|
|
Yep, it's a game of tag :P |
|
NavydevJoin Date: 2012-02-21 Post Count: 274 |
Roblox spazzes out when dealing with characters. Usually it demands that you check if the person is real (person.Character) and if they have the child Humanoid (person.Character.Humanoid) other then that, it should work. |
|
iPremiumZJoin Date: 2012-01-23 Post Count: 6834 |
One more question, can I say:
if script.Player.Visible == true then
blah blah blah
would that work |
|
|
Yes, but you can just say "if script.Player.Visible then" - I think?
† KMXD † |
|
NavydevJoin Date: 2012-02-21 Post Count: 274 |
.Visible isnt real for a character, but im guessing the entire person has to be visible, right?
So you can't say that in a script. |
|
iPremiumZJoin Date: 2012-01-23 Post Count: 6834 |
i failed i meant to say script.Parent... |
|
|
You would actually want to say
if script.Parent.Torso.Transparency > 0 then
blah blah blah |
|
iPremiumZJoin Date: 2012-01-23 Post Count: 6834 |
while true do
if script.Parent.Visible == true then
wait(1)
script.Parent.Text = "You Exit The Cave."
wait(1)
script.Parent.Text = "You Exit The Cave.."
wait(1)
script.Parent.Text = "You Exit The Cave..."
end
end)
this working? |
|
NavydevJoin Date: 2012-02-21 Post Count: 274 |
if script.Parent.Visible == true then
will work if a few conditions are met.
First off, a player does not have "Visible" and so it will break if you try this.
You can call .Visible if the object you are calling has another object it in, called Visible. Like so:
part
| |
thescript Visible(could be a model, a num/bool/etc value, another part called Visible)
Then it will work. |
|
iPremiumZJoin Date: 2012-01-23 Post Count: 6834 |
while true do
if script.Parent.Visible == true then
wait(1)
script.Parent.Text = "You Exit The Cave."
wait(1)
script.Parent.Text = "You Exit The Cave.."
wait(1)
script.Parent.Text = "You Exit The Cave..."
end
end)
-- Didn't work, anyone know way? |
|
|
while true do
if script.Parent.Visible then
wait(1)
script.Parent.Text = "You Exit The Cave."
wait(1)
script.Parent.Text = "You Exit The Cave.."
wait(1)
script.Parent.Text = "You Exit The Cave..."
end
end --No need for the parenthesis
† KMXD † |
|
|
Change 'script.Parent.Visible == true then' to 'script.Parent.Torso.Transparency > 0 then' |
|