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

Im getting a error at line 22 And I dont know why? error: (Vector3 expected, got Instance)

Thank you for reading.

local debounce = false
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
mouse.KeyDown:connect(function(key)
	if key == "q" then
		if not debounce then
			debounce = true
			local part = game.ReplicatedStorage.Part:Clone()
			local part2 = game.ReplicatedStorage.Part:Clone()
			local part3 = game.ReplicatedStorage.Part:Clone()
			local Icep = game.ReplicatedStorage.Icep:Clone()
			local animInstance = Instance.new("Animation")
			animInstance.AnimationId = "rbxassetid://6379945857"
			local character = player.Character or player.CharacterAdded:Wait()
			local humanoid = character:WaitForChild("Humanoid")
			local anim = humanoid:LoadAnimation(animInstance)
			local torso = game.Workspace:FindFirstChild(player.Name)
			local player = game.Players.LocalPlayer
			wait(1)
			Icep.Parent = game.Workspace
			anim:Play()
			Icep.Position = torso.UpperTorso
			part.Parent = game.Workspace
			part.Position = torso.UpperTorso.Position
			wait(3)
			part2.Position = torso.UpperTorso.Position + Vector3.new(0,6,0)
			part2.Parent = game.Workspace
			wait(2)
			part3.Position = torso.UpperTorso.Position + Vector3.new(0,7.5,0)
			part3.Parent = game.Workspace
			wait(8)
			debounce = false
			end
	end
	end)

2 comments

1

Icep.Position = torso.UpperTorso.Position (try that!)

0

Ye I made such a small mistake I should of just looked my self anyways thx!

2 answers

Quick explanation: you say "torso.UpperTorso".... UpperTorso is an instance, and you did not get the position of it. just add .Position to the end, and the error goes away.

Icep.Position = torso.UpperTorso -> Icep.Position = torso.UpperTorso.Position

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