|
| 21 Dec 2015 05:03 PM |
How would i add permissions to this:
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) if message == "load seats" then game.Workspace.Seat252:MoveTo(workspace.Seatsteleport.Position) end if message == "unload seats" then game.Workspace.Seat252:MoveTo(workspace.Seatsunteleport.Position) end if message == "load sphere" then game.Workspace.SphereCxD:MoveTo(workspace.SphereTeleport.Position) end if message == "unload sphere" then game.Workspace.SphereCxD:MoveTo(workspace.Seatsunteleport.Position) end if message == "load meeting" then game.ReplicatedStorage.XxHjKi098H:Clone().Parent = game.Workspace end if message == "unload meeting" then game.Workspace.XxHjKi098H:Clone().Parent = game.Workspace end end) end)
|
|
|
| Report Abuse |
|
|
XIPokezIX
|
  |
| Joined: 24 Sep 2015 |
| Total Posts: 381 |
|
|
| 21 Dec 2015 05:08 PM |
table={"addname","morenamesifyouwant"} game.Players.PlayerAdded:connect(function(player) if table[player.Name] then player.Chatted:connect(function(message) if message == "load seats" then game.Workspace.Seat252:MoveTo(workspace.Seatsteleport.Position) end if message == "unload seats" then game.Workspace.Seat252:MoveTo(workspace.Seatsunteleport.Position) end if message == "load sphere" then game.Workspace.SphereCxD:MoveTo(workspace.SphereTeleport.Position) end if message == "unload sphere" then game.Workspace.SphereCxD:MoveTo(workspace.Seatsunteleport.Position) end if message == "load meeting" then game.ReplicatedStorage.XxHjKi098H:Clone().Parent = game.Workspace end if message == "unload meeting" then game.Workspace.XxHjKi098H:Clone().Parent = game.Workspace end end end) end)
|
|
|
| Report Abuse |
|
|
|
| 21 Dec 2015 05:18 PM |
| Theres an error with the end at bottom says " expected identifier" |
|
|
| Report Abuse |
|
|
|
| 21 Dec 2015 05:19 PM |
| about closing something on line 4 ;/ |
|
|
| Report Abuse |
|
|
XIPokezIX
|
  |
| Joined: 24 Sep 2015 |
| Total Posts: 381 |
|
| |
|
| |
|
XIPokezIX
|
  |
| Joined: 24 Sep 2015 |
| Total Posts: 381 |
|
|
| 21 Dec 2015 05:22 PM |
| Add another end or enclose a current end with a bracket. |
|
|
| Report Abuse |
|
|
XIPokezIX
|
  |
| Joined: 24 Sep 2015 |
| Total Posts: 381 |
|
|
| 21 Dec 2015 05:23 PM |
table={"addname","morenamesifyouwant"} game.Players.PlayerAdded:connect(function(player) if table[player.Name] then player.Chatted:connect(function(message) if message == "load seats" then game.Workspace.Seat252:MoveTo(workspace.Seatsteleport.Position) end if message == "unload seats" then game.Workspace.Seat252:MoveTo(workspace.Seatsunteleport.Position) end if message == "load sphere" then game.Workspace.SphereCxD:MoveTo(workspace.SphereTeleport.Position) end if message == "unload sphere" then game.Workspace.SphereCxD:MoveTo(workspace.Seatsunteleport.Position) end if message == "load meeting" then game.ReplicatedStorage.XxHjKi098H:Clone().Parent = game.Workspace end if message == "unload meeting" then game.Workspace.XxHjKi098H:Clone().Parent = game.Workspace end
end) end end) |
|
|
| Report Abuse |
|
|
|
| 21 Dec 2015 05:24 PM |
| tried that, fixed error but script doesn't work :/ |
|
|
| Report Abuse |
|
|
XIPokezIX
|
  |
| Joined: 24 Sep 2015 |
| Total Posts: 381 |
|
|
| 21 Dec 2015 05:24 PM |
| Did you try what I just wrote a minute before you replied? |
|
|
| Report Abuse |
|
|
| |
|
XIPokezIX
|
  |
| Joined: 24 Sep 2015 |
| Total Posts: 381 |
|
|
| 21 Dec 2015 05:27 PM |
| Just tested it and it works . Are you sure you haven't made a pasting error? |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Dec 2015 05:31 PM |
| only thing changing is i add my name.. :/ and the Player that i am in studio ;P |
|
|
| Report Abuse |
|
|
| |
|
XIPokezIX
|
  |
| Joined: 24 Sep 2015 |
| Total Posts: 381 |
|
|
| 21 Dec 2015 05:51 PM |
| Maybe replace player.Name with player |
|
|
| Report Abuse |
|
|
| |
|
|
| 21 Dec 2015 05:57 PM |
| doesnt't pass the if table(player) part.. i added a print to check and nothing prints.. lol |
|
|
| Report Abuse |
|
|
| |
|
| |
|
XIPokezIX
|
  |
| Joined: 24 Sep 2015 |
| Total Posts: 381 |
|
|
| 22 Dec 2015 08:05 AM |
table={"addname","morenamesifyouwant"} game.Players.PlayerAdded:connect(function(player) ev=table[player.Name] if not ev then return end player.Chatted:connect(function(message) if message == "load seats" then game.Workspace.Seat252:MoveTo(workspace.Seatsteleport.Position) end if message == "unload seats" then game.Workspace.Seat252:MoveTo(workspace.Seatsunteleport.Position) end if message == "load sphere" then game.Workspace.SphereCxD:MoveTo(workspace.SphereTeleport.Position) end if message == "unload sphere" then game.Workspace.SphereCxD:MoveTo(workspace.Seatsunteleport.Position) end if message == "load meeting" then game.ReplicatedStorage.XxHjKi098H:Clone().Parent = game.Workspace end if message == "unload meeting" then game.Workspace.XxHjKi098H:Clone().Parent = game.Workspace end
end) end) |
|
|
| Report Abuse |
|
|
basw666
|
  |
| Joined: 20 Dec 2015 |
| Total Posts: 11 |
|
|
| 22 Dec 2015 09:37 AM |
local players = {"Player", "warlord436"} function players:Find(name) for _, v in next, self do if (v:lower() == name:lower()) then return true end end end game.Players.PlayerAdded:connect(function(player) local ev = players:Find(player.Name) if not ev then return end player.Chatted:connect(function(message) if message == "load seats" then workspace.Seat252:MoveTo(workspace.Seatsteleport.Position) end if message == "unload seats" then workspace.Seat252:MoveTo(workspace.Seatsunteleport.Position) end if message == "load sphere" then workspace.SphereCxD:MoveTo(workspace.SphereTeleport.Position) end if message == "unload sphere" then workspace.SphereCxD:MoveTo(workspace.Seatsunteleport.Position) end if message == "load meeting" then game.ReplicatedStorage.XxHjKi098H:Clone().Parent = workspace end if message == "unload meeting" then workspace.XxHjKi098H:Clone().Parent = workspace end end) end) |
|
|
| Report Abuse |
|
|