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

How do I make a block teleport to the user?

Asked by 5 years ago

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("

0
ps. I showed you guys the script so that you can use the variables iiceandfire 4 — 5y
0
add a player argument then do local Variable = player.Parent.Character:WaitForChild("PlayerPart") and then BlockThatHurts.CFrame = Variable.CFrame Microsoft_Net 21 — 5y
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. CommanderCaubunsia 126 — 5y
0
c o d e b l o c k s LoganboyInCO 150 — 5y
0
c o d e b l o c k s LoganboyInCO 150 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

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

Ad

Answer this question