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

How do you make a button load a map, weapon, and death limit?

DISCLAIMER: My real account is DragonBallFan100. The reason I made this account is because the code to verify my account kept getting blocked because I'm under 13, and I do not want to wait 2 more years.

ANYWAY: As I stated in my previous question, I am helping my friend bshamu make a war clan. We both work on the place. And I'm making a GUI that loads weapons and maps, and a death limit. How do I do all those? For example:

Click on sword, I get the sword. Click on the map Bricktops, I get Bricktops. Click on the death limit, After they reach the death limit, they will be teamed spectators and respawned to the lobby. Oh, and one more thing I forgot to mention. I want to make this visible to ONLY HIGH RANKS LIEUTENANT+. The thing is, how do I do all of this? Thank you for your feedback.

2 comments

0

This isn't a request website.

0

I am simply asking a question. I come here for answers.

1 answer

I can help with the sword.

So, let's get started, shall we?

You want to insert a SCRIPT into the button.

First line of the code should be at the very top and it should determine where the actual sword (the tool) is located and where the click detector is at. The click detector should always been in the block you're wanting to activate.

local sword = game.ReplicatedStorage.Tools.Sword:Clone()

Next, we want to determine when the buttonk is being clicked. So, we do this:

script.Parent.MouseButton1Click:connect(function()
end

After all of this, we want to put all of this together, so, we do this:

local sword = game.ReplicatedStorage.Tools.Sword:Clone()

script.Parent.MouseButton1Click:connect(function()
sword.Parent = script.Parent.Parent.Parent.Parent.Character
end


If my code worked, please accept my answer! :)

5 comments

0

Well, I'm clicking a GUI, so I don't need a click detector.

0

Ah, my apologies. Let me redo all of that then.

0

The code I have listed is now prepared for a button inside of a GUI.

0

If you want you could do an anonymous function if you only have that 1 function only doing 1 thing

0

Also, if you read my entire question, I want it only to be visible for high ranks in the group

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