I have this so far
1 | part = Instance.new( 'Part' ,workspace) |
2 | part.FormFactor = 'Custom' |
3 | part.Size = Vector 3. new( 5 , 4 , 0.1 ) |
4 | part.Anchored = true |
5 | part.CFrame = game.workspace.DullBakuganroll.Head.CFrame*CFrame.new( 0 , 0 ,- 5 )*CFrame.Angles( 0 ,math.pi* 1 / 4 , 0 ) |
I'm aware that this makes it turn 45 degrees, but how do I make it tilt the same amount, but forwards?
01 | --// Gets player |
02 | local person = game.workspace:FindFirstChild( "DullBakuganroll" ) or game.workspace:WaitForChild( "DullBakuganroll" ) -- Change to the playername |
03 | --// Inserts a new part into player |
04 | part = Instance.new( 'Part' ,person) |
05 | --// Edits part's properties |
06 | part.FormFactor = 'Custom' |
07 | part.Size = Vector 3. new( 5 , 4 , 0.1 ) |
08 | part.Anchored = true |
09 | part.Rotation = Vector 3. new( 0 , 0 , 45 ) -- change any value to however you want |
10 | --// Makes part follow player |
11 | while wait() do |
12 | part.Position = person.Head.CFrame * Vector 3. new( 0 , 10 , 0 ) -- change to see how far you want it above your head |
13 | end |
There is somethings I changed. I made it simple by using the part's rotation and made it follow you, so it won't stay in place
I made sure it would always go and use FindFirstChild("DullBakuganroll")
and WaitForChild("DullBakuganroll")
so no errors would occur than using game.workspace.DullBakuganroll
I put the part into the player so you can tell where it is.