Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Changing properties of a part using a touch event on a different part?

Asked by 5 years ago
Edited 5 years ago

I am trying to make a monster break out of it's cage when you step on a certain object. I'm not a good scripter but I can do the basics. However, this script won't work. The lights are supposed to go out when you step on a part and when you get off of the part, the lights will come back on and the monster will be gone. But I'm only trying to make the monster transparent. Does anyone know how to do this?

P.S. The part you touch and the part that becomes transparent are completely different parts.

0
Post the script you have so far please. Lucke0051 165 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Insert into other part:

function Touch()
 --[[Changing BrickColor]]
 workspace.OtherBrick.BrickColor = BrickColor.Green() --color here
 --[[Changing Color]]
 workspace.OtherBrick.Color = Color3.fromRGB(numberR,numberG,numberB)
 --[[Changing Size]]
 workspace.OtherBrick.Size = Vector3.new(numberX,numberY,numberZ)
 --[[Changing Position]]
 workspace.OtherBrick.Position = Vector3.new(numberX,numberY,numberZ)
end

script.Parent.Touched:connect(Touch)

To do another thing, just insert it into the function Touch() .

0
Thank you, This is just what I needed! Captain0Jack0Sparrow 26 — 5y
Ad

Answer this question