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

How do you unweld the Handle?

Asked by 4 years ago

I added a script inside the Handle and typed:

script.Parent.Name = '_'
wait(2)
script.Parent.Name = 'Handle'

But, it still was attached to my hand. Why is that?

0
Are you using a local script? 0Papa_Rat0 63 — 4y
0
No, a server script :l Hoogidy_Boogidy 18 — 4y
0
Any errors? is that the full code? 0Papa_Rat0 63 — 4y
0
yes Hoogidy_Boogidy 18 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Make sure the you make a spawnLocation so you'll spawn at the ground, otherwise the tool will spawn in the air, unless you want it to do that then it's your choice.


-- This script is a normal script, inside StarterPack, i think it doesn't really matter where it is, just make sure it's in a location where normal scripts are acceptable to run. -- Make sure to put the tool in "ReplicatedStorage" local tool = game.ReplicatedStorage.Tool:Clone() -- cloning the part, and set the cloned part to be a variable wait(3) -- Making sure the player has loaded in before the script runs, (You can do this an alternative way with :LoadCharacter(). tool.Parent = game.Workspace tool.Handle.Position = game.Workspace:WaitForChild("YOUR NAME HERE").HumanoidRootPart.Position + Vector3.new(0,0,-5) -- ating the tool's cloned position to your position, and then offsetting it from the z axis to make sure you won't automatically pick it up, intead it's in front of you. wait(2) tool.Handle.Position = game.Workspace:WaitForChild("YOUR NAME HERE").HumanoidRootPart.Position -- Setting the tool's cloned position to your absolute position. -- Therefore you will automatically be equipping the tool. -- There's a much efficient way of doing this, but to keep it simple, this is the most simple way of doing it.
0
You don't have to wait, you can time it perfectly by typing "game.Players.PlayerAdded:Connect(function(player --[[ Instead of saying "YOUR NAME HERE", you can just type "player.Name" ]])" and then it auto puts "end)" then put alllll that code into there Hoogidy_Boogidy 18 — 4y
0
Sorry, but this unefficient and not simple. I understand now, but there are better ways. Sorry :l It works, but I will improve it. Hoogidy_Boogidy 18 — 4y
0
I understand, i tried doing game.Players.PlayerAdded:Connect(function(player), but that didn't seem to run the code correctly, but glad i could atleast try to help! ZOOP1015 44 — 3y
Ad

Answer this question