Ive made a script that teleports people to a certain spawn when they are in the group . But the problem is, it doesnt work in servers. only in studio. Can someone fix that for me? I need this script to work in servers:
while wait(1) do if game.Players.LocalPlayer.TeamColor == BrickColor.new("Pastel green") or game.Players.LocalPlayer.TeamColor == BrickColor.new("Bright red") then end end
I hope someone can fix the script for me, Thanks!
Ive added wait for child but it still doesnt work!
local player = game.Players.LocalPlayer:WaitForChild(script) script.Parent.MouseButton1Click:connect(function(oof) player.TeamColor = BrickColor.new("Pastel Green") local humanoid = game.Players.LocalPlayer.Character.Humanoid humanoid.Health = 0 local allow = ( player:IsInGroup(3690337) or game.CreatorId == player.userId ) if allow then oof () end --Made by SomeRandomGuy13564 for Chrisd_1908--
Hopefully, this should work:
local player = game.Players.LocalPlayer script.Parent.MouseButton1Click:connect(function(oof) player.TeamColor = BrickColor.new("Pastel Green") local humanoid = game.Players.LocalPlayer.Character.Humanoid humanoid.Health = 0 local allow = ( player:IsInGroup(3690337) or game.CreatorId == player.userId ) if allow then oof() end end)
(PUT THIS IN A TextButton)