Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I make a part teleport to you after a certain amount of time?

Asked by
ads_bv 29
3 years ago

I tried to make a script of it but it didnt work. Here is the script I used: local award = game.Workspace.BadgeAwarder2 local player = game.Players.LocalPlayer local character = game.Players.LocalPlayer.Character local humanoid = character:WaitForChild("Humanoid") local humanoidRootPart = character:WaitForChild("HumanoidRootPart")

wait(10) award.Part.Position=Vector3.new(humanoidRootPart.Position)

1 answer

Log in to vote
0
Answered by 3 years ago

You put "Vector3.new(humanoidRootPart.Position)" instead of just "humanoidRootPart.Position"

The position propertie is already an vector3, so, you're trying to put an vector3 inside a vector3.new, ti causes an error because of that, heres a fixed script

local award = game.Workspace.BadgeAwarder2 
local player = game.Players.LocalPlayer 
local character = game.Players.LocalPlayer.Character 
local humanoid = character:WaitForChild("Humanoid") 
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")

wait(10) 
award.Position = humanoidRootPart.Position
Ad

Answer this question