Okay so basically. I have a part where if you touch it. It changes text on a gui and it says secure. but whenever 1 player does it. it changes the text for everyone. I dont want it to change the text for everyone. Just for the player that touched the part.
ServerScript
secureEvent.OnServerEvent:Connect(function(player) print(player.Name) player.Character.StatusValue.Value = "Secure" player.PlayerGui.Status.StatusFrame.StatusState.Text = "Secure" player.PlayerGui.Status.StatusFrame.StatusState.TextColor3 = Color3.new(0.180392, 1, 0) print(player.Name.." is secure") end)
LocalScript
local hostile = game.Workspace.HostileTerritory local secure = game.Workspace.Secure local hostileEvent = game.ReplicatedStorage.Events.PlayerStatus.HostileEvent local secureEvent = game.ReplicatedStorage.Events.PlayerStatus.SecureEvent secure.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then secureEvent:FireServer() print("the event was fired") end end)