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

Cloning and or destroying equiped weapons?

Asked by 7 years ago

I am trying to make my game so that if you walk into your tycoon your sword will be destroyed and when you walk out it will be restored. I tried a lot of videos but could not find one to help me.

1 answer

Log in to vote
0
Answered by 7 years ago

The weapon will be in one of three places, The player's Backpack, their character, or their startergear.

local BP = game.Players.LocalPlayer.Backpack;
local Char = game.Players.LocalPlayer.Character;
local SG = game.Players.LocalPlayer.StarterGear;

In these places you can just do a :FindFirstChild("Name of sword here") and then get the sword. After that you can destroy it if you would like, or you could just move it to lighting of some other place for storage until they would be allowed to use it again.

Hope this helps. If it did please accept this as the answer, if it doesn't help, let me know and I will help. If you have any other questions feel free to ask.

Ad

Answer this question