How do I make a script that teleports a part (called part1) to the player's current position?
Here is my current script so far:
function onClicked(hit) workspace.part1.Position = Vector3.new() end script.Parent.MouseButton1Click:connect(onClicked)
you showed little to no effort in your script so here you go
function onClicked(hit) workspace.part1.CFrame = workspace:FindFirstChild(script.Parent.Parent.Parent.Name) -- change this end script.Parent.MouseButton1Click:connect(onClicked)
local PartToTeleport = game.Players.LocalPlayer.Character.HumanoidRootPart local PartToBring = workspace.Part2 local Offset = CFrame.new(0,1,0) script.Parent.MouseButton1Click:Connect(function() PartToTeleport.CFrame = PartToBring.CFrame * Offset end)