(Sorry, my english isnt that good) I already asked about this and someone provided me whit the script but... Me and my friend have different values (thats ok, i joined first, he second) But then my friend touches the part and our values are set (Thats not supposed to happen, only my friend value should be set), so how do i detect who is touching the part and how do i change the values for that person? Here is the code that he provided to me, but a bit changed.
game.Workspace.Part.Touched:Connect(function()
game.Players.LocalPlayer.PlayerGui.Value1.Value = 100
game.Players.LocalPlayer.PlayerGui.Value2.Value = 0
end)

5 comments
You shouldn’t use a local script for a touched script. Use a server script and just get the player from the character, then change their values from there
How? Im kinda new at scripting
You would need to add a parameter to the function so like function(hit) and then do player = game.Players:GetPlayerFromCharacter(hit.Parent) and then you can do player.PlayerGui.Value1.Value = 1
I realy dont understand, could you show me how? Sorry if i annoy you.
Naw you’re all good dude