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

How do I equip tools once the CoreGUI is off?

Asked by 8 years ago

I think it's pretty obvious that once you turn off your CoreGUI you can't equip a tool from the backpack. In games like Phantom Forces, you can equip what gun you want, and once you join the game, it equips you with the weapon you chose (and you cannot unequip it). How do I do this?

https://www.youtube.com/watch?v=aC8GEQHc_r0

Example of what I mean ^

I'm not asking for you guys to do it for me, I just want to know how.

1 answer

Log in to vote
1
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
8 years ago

Great question! To equip a tool, parent it to the Player's Character! To unequip it, take it out!

0
local plr = game.Players.LocalPlayer local button = script.Parent.TextButton local tool = script.Parent.MachineGun button.MouseButton1Click:connect(function() tool.Parent = plr.Character end) MariusAurelius 85 — 8y
0
local plr = game.Players.LocalPlayer local button = script.Parent.TextButton local tool = script.Parent.RocketLauncher button.Parent = workspace local clone = tool:Clone() print(clone.Parent) button.MouseButton1Click:connect(function() tool.Parent = plr.Character end) MariusAurelius 85 — 8y
Ad

Answer this question