I could not figure out why this is not working. I was looking for it to be set up so that if a staff rank says "Give (player name) Room (Number)" it clones the tool from Replicated Storage into the player which is receiving the tool gets it in their inventory. I am not so sure on the part where the player is allocated when the message by the staff member is triggered.
local GroupID = 3248427 game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) if player:IsInGroup(GroupID) and player:GetRankInGroup(3248427) >= 5 then if message == ":give "..player.." room 101" then player.Character:GetChildren() game.ReplicatedStorage.Room101.Parent:Clone() game.ReplicatedStorage.Room101.Clone = game.Players.Character() end end end) end)
Hello, Nikkasfied!
I made your script work!
Just what you need to do is to copy and understand what I did, I want you to learn roblox lua!
local GroupID = 3461088 game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(message) if player:IsInGroup(GroupID) and player:GetRankInGroup(3461088) >= 252 then if message == ":give ".. player.Name .." room 101" then player.Character:GetChildren() print(player.Character.Name) print(player.Name) game.ReplicatedStorage["Room101"]:Clone().Parent = game.Workspace[player.Name] end end end) end)
Good Luck with your games