I need a string value in a player to constantly this part's position. This isn't the following script, cuz the rest of it works fine. In this line it says " attempt to concatenate field 'Position' (a userdata value)" and then doesn't change the value. Any help?
Player[script.Parent.ItemNumberPos.Value].Value = ""..script.Parent.PrimaryPart.Position..""
In order to concatenate Position, or a Vector3, you would need to use the tostring()
function. all tostring()
does is makes numbers, userdatas, etc into a string so it can be concatenated or printed.
To fix your code,
Player[script.Parent.ItemNumberPos.Value].Value = tostring(script.Parent.PrimaryPart.Position)
I hope you've learned from this, and have an excellent day!