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

How would you make a part spawn relative to the player?

I would like to have it so that when a player is touching a certain part in workspace or on a certain surface of any part, a transparent part spawns below them then is removed after about a second.

2 comments

0

This isn't a request site. Have you attempted to make anything like this?

1

Im asking how to spawn a part relative to the player, Then stated how im using it, I asked a question, then over elaborated.

2 answers

Set the Part's CFrame property relative to the Character's HumanoidRootPart's CFrame like so:

local origin = yourCharacter.HumanoidRootPart.CFrame --Define the character
local offset = CFrame.new(0,-1,0) --Define the offset
local part --Define the part

part.CFrame = origin * offset --Set the CFrame

######Look into the Destroy function for part removal

I'm not going to do it for you, but here's how you would do it roughly:

• First of all, create a time loop that runs every second.
• Second, create a brick 3.5 studs underneath the position of the player's torso.
• Set transparency to 1 and anchored to true.
• Wait 1 second.
• Delete part.

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