Why doesn't it teleport all players??
so I was trying to make a script where it changes peoples clothes, teleports them and enables a local script, for some reason when I do it, it only does it to one player and not both.
I don't know what I am doing wrong. (Note: this is in a non-fe game since this is going to be a
non-public game, only me and my friends that I know locally will play.)
06 | game.Players.PlayerAdded:connect( function (player) |
07 | if group [ player.Name ] then |
08 | player.Chatted:connect( function (msg) |
09 | if msg = = "@Start" then |
10 | for i,v in pairs (game.Players:GetChildren()) do |
11 | if v.Name ~ = "Mr_Staticz" then |
12 | v.Character.Humanoid.WalkSpeed = 0 |
15 | if v.Name = = "Mr_Static" then |
16 | v.Character.HumanoidRootPart.CFrame = CFrame.new(Vector 3. new(- 370.96 , 2192 , 55.664 )) |
18 | if v.Name = = "luka_1630" then |
19 | v.Character.HumanoidRootPart.CFrame = CFrame.new(Vector 3. new(- 304.157 , 2192.655 , 27.778 )) |
22 | v.PlayerGui.CutsceneScript.Disabled = false |
23 | game.Workspace.HGForest.Theme:Play() |
25 | game.Workspace.HGForest.Theme:Stop() |
What it's supposed to do is when Mr_Static chats @Start it makes every player other than Mr_Staticz walkspeed 0 and change their clothing. Then if the players name == Mr_Static it would teleport him to -370.96, 2192, 55.664 and if the players == luka_1630 then it would teleport them to -304.157, 2192.655, 27.778 and enable the localscript aswell as play the audio.
Basically what happens is when Mr_Static says @Start does everything what it's supposed to but only for Mr_Static, and not for luka_1630 which is supposed to have the same thing happen as Mr_Static just different teleport location.
If someone could help me with this and tell me what I am doing wrong, that would be great thanks.