Alright, im asking the same question the third time yet i dont recieve an answer, please do it.
After people complained the winpad teleporting everyone to the lobby when someone touches it, I changed it to local script. However it dosent do anything but in the output, no errors. I would appreciate anyone whoever answers.
local debounce = false
local part = script.Parent
local LobbySpawn = game.Workspace.Lobby.Floor.Center.SpawnLocation
part.Touched:Connect(function()
if debounce == false then
debounce = true
for _, player in pairs(game.Players:GetPlayers())do
local char = player.Character
char.HumanoidRootPart.CFrame = LobbySpawn.CFrame
wait(1)
for i,v in pairs(game.Players:GetPlayers()) do
if v:FindFirstChild("leaderstats") then
v.leaderstats.Credits.Value = v.leaderstats.Credits.Value + 20
v.leaderstats.Wins.Value = v.leaderstats.Wins.Value + 1
debounce = false
end
end
end
end
end)

2 comments
A local script won't make it better but worse because of filtering enabled. I think you should change it back to a server script.
ok but i dont want the win pad to teleport everybody to the lobby when someone touches it