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

Change body position to position of another brick in workspace?

Asked by 7 years ago

What I have is a bullet that follows a brick using body position, and the body position changing to the brick's position whenever the brick moves. I tried doing it, but the body position doesn't change at all. Here's my script.

while true do
local pos = follow.Position
script.Parent.Parent.Barrel.Sound:Play()
bullet.BodyPosition.Position = Vector3.new(pos)
end
0
also, there are hidden elements not included in the script I gave you. Follow = the brick that the bullet follows. flufffybuns 89 — 7y
0
nevermind, found a solution flufffybuns 89 — 7y
1
since you found a solution can you put [SOLVED] at the end of the title so it closes abnotaddable 920 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

There ain't any waits and with 'while true do' scripts if there ain't no waits the game crashes.

while true do
local pos = follow.Position
script.Parent.Parent.Barrel.Sound:Play()
bullet.BodyPosition.Position = Vector3.new(pos)
wait()
Ad

Answer this question