I need help in with this simple script

Hello!
so I’ve made a part that would change in part positions between hand positions.
I get confused sometimes between scripts so I’d rather work with values when i do multiple things with things like that, I want the script to decide between hand positions with the Value, not the script it self.

Here is the script:

local HandPosValue = script.HandValue.Value
local PartHolder = Instance.new("Motor6D",char.RightHand) -- I want it to go by the Value's value.

PartHolder.Part0 = PartHolder.Parent
PartHolder.Part1 = Part

Whenever I do this, the script sends an error

local PartHolder = Instance.new("Motor6D",char.HandPosValue)

PartHolder.Part0 = PartHolder.Parent

Error:

image

Help is appreciated!

image

I don’t see where you are concatenating. Are you sure the error comes from that script?

refresh the page I added an image

U shouldn’t use Instance.new’s Parent arguments. Also u should do this on the server. Also shouldn’t it be script.HandPosValue?

If I’d to it with a normal script would the clicking button script work?

U would need to use RemoteEvent. And it seems like the value is a StringValue. Which would not work.

you probly didn’t get that right, so I just want the script to get managed by the Value, example:
local WaitTime = script.Parent.WaitValue.Value wait(WaitTime) – This is what I mean, I want it to listen to the value but it sends an error.
(THE OTHER SCRIPT)