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

How do I make the :give command to everyone? (everyone can use it)

I have a Hotel and I made a Hotel system and to get the card you have to say :give (username) (number of room) and it gets the card from server storage but the only problem is my receptionist cannot do the :give because they don't have admin but I don't want them to have admin because they could mess around with it and people kicked or banned for no reason. So it there some way where I can get the :give command to everyone? Or at least receptionist and up?

10 comments

0

Is your game team based or group role based?

0

I have a Hotel and I have a group for it and I don't have teams in the game but I have roles like Rank lO is manager.

0

I don't see how that script will help I'm just trying to get the :give command for at least rank for and up.

0

This isnt a request site

0

I know I just want to learn how to do the script.

0

You would use GetRankInGroup to determine if a user is a "receptionist" or not. If they are then they will get the give command!

0

Ohh okay! Thank you!

0

Just use player.Chatted event, string:split() and :Clone()

0

@DrShockz Hello! I have a quick question for your Hotel system it works good but when I unlock it it oesn't fade in/out it just stays open for like ever XD

1 answer

✓ Accepted answer
local RR = 10 --Rank requirement to use this command
local GiveCommand = ":Give" --Command to give
Players.PlayerAdded:Connect(function(Player) 
	if Player:GetRankInGroup(GroupID) >= RR then -- Checks if the player has the required rank
		Player.Chatted:Connect(function(Message) -- If so, check their chat messages.
			local LowerMessage = string.lower(Message) -- Makes it so you can say :GiVe
			if LoadCommand == string.sub(LowerMessage,1,#LoadCommand) then -- Checks if message starts with :Give
				local PlayerToGive = string.sub(LowerMessage,#LoadCommand+2, 16) -- Gets the Player
			
			end
		end)
	end
end)

6 comments

0

Thank you so much!

0

I have a question for it though, do I do Local Script or Script, and what do I put it in when it's done?

0

@palav I tried the script (copied and pasted it) It didn't work maybe because I changed script name, also I did just a "Script" not "Local script" also I put my group ID in and the rank requirement. I also put the script in Server Script Service, did I do something wrong?

0

Put it in a script in server script service, as you did. Beyond that, did you put any code after the PlayerToGive part? Right now all it does is check if the person said :Give and gets the player name

0

@palav I didn't put any code after it. Was I supposed to?

0

Yeah, right now it won't perform any visual changes. You're meant to input the code that actually give the player the pass.

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