Hi, when i touch the same part with two different players the gui changes visibility and thats a problem
this is the code i have in a local script:
local Workspace = game:GetService(“Workspace”)
local Players = game:GetService(“Players”)
local client = Players.LocalPlayer
local part = game:GetService(“Workspace”):WaitForChild(“touchToEquipChair”)
local debounce = true
part.Touched:Connect(function(other)
local character = client.Character
client.PlayerGui.test.t1.Visible = other:IsDescendantOf(client.Character)
if debounce == true then
repeat
wait()
until (character.HumanoidRootPart.Position - part.Position).magnitude > 10
debounce = false
wait(0.2)
debounce = true
end
client.PlayerGui.test.t1.Visible = false
end)
how i can solve this without remote events???