In my game there is a yoshi morph and a gui that makes his tongue stick out. They both work. When someone gets hit by the tongue they freeze and that works too. But when the tongue isn't sticking out, the player can still get hit by it, even if it's CanCollide is false. The player doesn't hit the tongue like it would if its CanCollide was true. They walk through it but get affected by the script. I know CanCollide is false because in solo mode I have clicked the gui while looking at the tongues properties and seen when it is true and false. Here is the script that makes the tongue appear. It's in the gui:
function color(mouse)
script.Parent.Parent.Parent.Parent.Character.Chest.Tongue.Transparency = 0
script.Parent.Parent.Parent.Parent.Character.Chest.Tongue.CanCollide = true
wait(3)
script.Parent.Parent.Parent.Parent.Character.Chest.Tongue.Transparency = 1
script.Parent.Parent.Parent.Parent.Character.Chest.Tongue.CanCollide = false
end
script.Parent.MouseButton1Down:connect(color)
So is there something wrong with my script or can a brick with a script in it really hit a person when its CanCollide is false. |