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

How do i make it so the candies spawn in front of the door?

Asked by
sebanuevo 123
4 years ago
Edited 4 years ago

Im making a halloween themed game, where when u click a door candies spawn infront of the door, i made a quick position for it

        Candy.Position = door.Position + Vector3.new(math.random(-2,4),0,-3)

But if u rotate the door, the candies dont spawn on the front anymore since the axis changes

So? how do i make it so it spawns in front of the door?

1 answer

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

My suggestion: make an invisible part that you can not collide with around where the door is, then spawn the candies from that. That way if you rotate the door it wont change the spawn

0
Oh right! i didn't think of that sebanuevo 123 — 4y
0
:) IAmRandomPlayer8263 15 — 4y
Ad

Answer this question