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

How do I make a block teleport to the user?

so, im making a game and idk how to make a parts position right by the player. A little help? Script:

Tool=game.Workspace.oof


Tool.Activated:Connect(function() local BlockThatHurts=Instance.new("Part",game.Workspace) BlockThatHurts.Size=Vector3.new(4.49, 4.72, 4.92) BlockThatHurts.Material="Neon" BlockThatHurts.BrickColor=BrickColor.new("

5 comments

0

ps. I showed you guys the script so that you can use the variables

0

add a player argument then do local Variable = player.Parent.Character:WaitForChild("PlayerPart") and then BlockThatHurts.CFrame = Variable.CFrame

0

We Wont ReWrite It- at least i wont sorry i dont have time, but i told you HOW so you can put in ito your code.

0

c o d e b l o c k s

0

c o d e b l o c k s

1 answer

Hello, Its simple, You Have Two Choices - Cframe Or Position... Position = x,y,z & CFrame = Position+rotation OR JUST x,y,z,r- So If You Did

part.Position = game.Workspace.iiceandfire.head.Position

That Would spawn the part there in its current position- So If You used CFrame (which you could either do this)

part.CFrame = game.Workspace.iiceandfire.Head.CFrame

or find whatever parts's position and doing

part.CFrame = CFrame.new(x,y,z)--spawns in that position AND automatically the player's rotation

then yes that teleports the part to the player's head. Please Correct me on any mistakes I mAy Have Mde Exept For Grammer. Unless someone cant UNDERSTAND IT. Mark As Answered If Answered Your Question-I will not help anymore so Please don't ask me anything else Peace Out YEAH

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