Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I fix this I have (Vector3 expected, got Instance)?

Thank you for reading please tell me whats wrong

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()

mouse.KeyDown:connect(function(key)
	if key == "q" then
		local torso = workspace:FindFirstChild(player.Name)
		local part = game.ReplicatedStorage.Part:Clone()
		part.Position = torso.UpperTorso
		part.Parent = game.Workspace
	end
end)

2 comments

1

change line 8 to [ part.Position = torso.UpperTorso.Position ], UpperTorso is an Instance, you need it's position.

0

Thank you so much! it worked!

1 answer

✓ Accepted answer

Change

part.Position = torso.UpperTorso

To

part.Position = torso.UpperTorso.Position

:)

This discussion is preserved as it was. New answers, comments, and votes are closed.