Hey ya'll!
I've created a sort of 'button' system. When a humanoid connects with a part, a different part has it's properties changed and a sound plays.
This works as expected, except when the button is pressed all players hear the sound/have the variable changed.
Here is my script atm:
local played = false
script.Parent.Touched:Connect(function(h)
if played == false then
script.Parent.SuccessSound:Play()
played = true
wait(2)
played = false
end
end)
script.Parent.Touched:Connect(function(h)
local hum = h.Parent:FindFirstChild("Humanoid")
if hum then
script.Parent.Parent.ButtonPlatform.Transparency = 0
script.Parent.Touched:Connect(function(h)
local hum = h.Parent:FindFirstChild("Humanoid")
if hum then
script.Parent.Parent.ButtonPlatform.CanCollide = true
end end) end end)
All of this script works completely fine and reliably but I'm still struggling to figure out how to make sure that only the person who hits the button sees and hears the changes.
Thanks!

1 comment
That worked perfectly!! TYSM!