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

How can I set properties locally using a click detector?

Asked by 3 years ago
Edited 3 years ago

I am using a click detector so a player can click a button and set properties of parts (transparency/CanCollide) locally so they are the only player seeing changes but since you cannot run local scripts in workspace I'm not sure how I can do this through a click detector or if this is even possible. Could remote events help this maybe?

1 answer

Log in to vote
0
Answered by 3 years ago

You could do this by detecting when the ClickDetector is clicked from the client and simply just change the properties of the parts on the client. You could run this code in a LocalScript from anywhere inside of the client.

local Part = workspace.Part

ClickDetector.MouseClick:Connect(function()
    Part.CanCollide = false
    Part.Transparency = 0
end)
0
Thanks! Works perfect! ElectricZooo 55 — 3y
Ad

Answer this question