Help making a checkpoint change color locally when touched

Hello, I am making an Escape game and when you touch a checkpoint it turns green But only for that player unless another player touches it and it turns green for them etc. I have tried watching a video but it doesn’t seem work it stays the same color.

this is the Local script Inserted in Starter GIU

local part = game.Workspace.spawn1

part.Touched:Connected (function(hit)
   if hit.Parent:FindFirstChild("Humanoid") then 
      part.BrickColor = BrickColor.new("Lime green")
  end
end)

I am not the best at scripting
I know how to make a brick change color when touched but not locally

Thanks in advanced Epicyann10 :slightly_smiling_face:

2 Likes

It’s because you wrote :Connected instead of :Connect

7 Likes

it works thanks :grinning:
should I turn filtering enabled on?
as the part changes color on the other persons screen as well

2 Likes

Yea nowadays if you don’t have filtering enabled on then your game won’t go anywhere. Also tbh filtering enabled makes scripting easier because it allows you to make changes only on one client and such. Since you’re trying to use this script to change things client-sidedly, have filtering enabled on.

1 Like