I want a system where it constantly checks if the player has 2 requirements to open a gate however for some reason the event is not firing meaning the part does not appear even though i have the requirements
Server Script:
game.Players.PlayerAdded:Connect(function(PlayerJoined)
while true do
task.wait(5)
if PlayerJoined:WaitForChild("leaderstats").MiningGloves.Value == 1 and PlayerJoined:WaitForChild("leaderstats").MiningGear.Value == 1 then
print("working1")
game.ReplicatedStorage.RemoteEvent6:FireClient(PlayerJoined)
else
warn("not enough")
end
end
end)
local script:
game.ReplicatedStorage.RemoteEvent6.OnClientEvent:Connect(function(Event)
print("working")
script.Parent.Transparency = 1
script.Parent.CanCollide = false
end)
It only outputs “working 1” the server script is in serverscriptservice and the local script is in the part i want to make disappear