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

How to we teleport a part to a player?

Hmm so i am trying to make a skill in roblox studio in which two swords rotate around the player. They can rotate around a part but not a player. So I have decided to teleport the part which cannot collide and Part.Visible = false. The problem is that i dont know how to teleport the part over to the player. I also want to make it for every player and not just me. this is the script i have for my swords that rotate around a part:

i = 0
dist = 15
spd = .1
angle = 0--how far the planet is tilted in it's orbit.
while true do 
i=i+1 
wait() 
script.Parent.CFrame = game.Workspace.Lol.CFrame*CFrame.fromEulerAnglesXYZ(angle,i*spd,0)*CFrame.new(0,0,dist)
end

i = 220
dist = 15
spd = .1
angle = 0--how far the planet is tilted in it's orbit.
while true do 
i=i+1 
wait() 
script.Parent.CFrame = game.Workspace.Lol.CFrame*CFrame.fromEulerAnglesXYZ(angle,i*spd,0)*CFrame.new(0,0,dist)
end

Thanks for any help given :)

2 comments

0

Hello, I am here to help you...please format your code in a code block.

0

It is in code

1 answer

just say:

local part = ______ -- Your part
local character = _______ -- The player's character which is in the workspace

part.CFrame = character.HumanoidRootPart.CFrame

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