Can someone please explain this to me

I’ve been confused and going through trial and error to try and get this to work and now that i am close to giving up this just randomly works? What is wrong with this script honestly because i cant see any problems.



This the working touch script but I didn’t actually physically touch the tool all I did was select it and it was in my hand.


Any replies appreciated!

are you trying to affect whoever equips the tool? if so, use tool.Equipped.

2 Likes

I tried tool.Equipped but the tool part has a blue highlighted line underneath it also thanks for the help yesterday.

The reason it went into the left hand on equip, is because when you selected it, it put the tool it the right hand. The touch registered, and immediately ran the code to put it in the left hand.

2 Likes

Is it bad to continue using this line of code or is it just a fluke and I shouldn’t use it?

What are you even trying to achieve?

1 Like

Well, if you are trying to put the tool in the left hand, I’d use the same code but using Equipped.
To be honest, I have no experience with tools, so that’s all I can say.

2 Likes

Since ROBLOX’s handles only allow one hand to hold a weapon and also adds that annoying holding animation I’ve wanted to use the same way but add my own animations and also the tool “pencils” is going to be a two handed weapon which roblox also doesn’t allow with normal handles.

And I’m more skilled in the building part of studio than scripting so I’m learning as I go.

Capture

change tool back to s, where did you get tool from?

1 Like

I’ve also tried that but then the script doesn’t even fire.


something else I would try is directly looking for the left hand instead of just defining it, I dont know if this is the issue, but try replacing

local LeftHand = char.LeftHand

with

local LeftHand = char:FindFirstChild("LeftHand")
1 Like

Capture33
same problem the script doesn’t seem to be activating.

Is it something to do with not using a local script, I’ve honestly put too much time into 8 or more lines of code I could have made a house. The blue line under tool is what’s annoying me there’s no reason for it to be there but I feel like that’s the root cause of all my problems with this script.

I really don’t see why this wouldn’t be working, but I do have one last thing that you could try.

You have player.Character listed, but most of the time, people use

local char = player.Character or player.CharacterAdded:Wait()
1 Like

Thanks for the help but still nothing, the code that you’re sending me probably works its just the function isn’t activating.

1 Like

actually my bad, that isnt the problem, i skimmed the script ._.

1 Like

The problem here is because you need to name a part of the tool Handle, not Handle1.

1 Like