Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Tool Giver With Chat Voice Not Working?

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)

1 answer

✓ Accepted answer

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

1 comment

0

Thank you for the advice! I will take this information into consideration.

This discussion is preserved as it was. New answers, comments, and votes are closed.