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

Change body position to position of another brick in workspace?

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

3 comments

0

also, there are hidden elements not included in the script I gave you. Follow = the brick that the bullet follows.

0

nevermind, found a solution

1

since you found a solution can you put [SOLVED] at the end of the title so it closes

1 answer

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()

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