Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I set properties locally using a click detector?

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

✓ Accepted answer

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)

1 comment

0

Thanks! Works perfect!

This discussion is preserved as it was. New answers, comments, and votes are closed.