Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Gun Selection screen help

Asked by 10 years ago

how would you make a gun selection screen a.k.a a screen GUI that is linked with the tool.Equipped event

1 answer

Log in to vote
0
Answered by 10 years ago

No, no. When you make a 'gun selection' GUI, you simply insert the gun into the character for an instant forced equip. For example, this LocalScript would go in a TextButton.

function onMouseButton1Down()
    gun = game.ReplicatedStorage.Gun
    gun:Clone().Parent = game.Players.LocalPlayer.Character
end

script.Parent.MouseButton1Down:connect(onMouseButton1Down)

Obviously, you would have to rework it a little depending on your situation.

Sidenote: Sometimes you lose parts when cloning Tools into the Character. I'm not sure why this happens, but it does, so be careful. You may be able to solve this by putting it in the Backpack for an instant before reparenting to the Character.

Ad

Answer this question