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

How do I make a part move using a script inside of it?

So im making a gun and it transfers a movement script I'm not sure how to make the bullet move tho so im looking for someone that knows a script

3 comments

0

use raycasting or bodyforces?

0

Scripting Helpers is noit a request site.

0

not*

1 answer

✓ Accepted answer

--Put this script inside your part --Make sure it's a regular script though

local bullet = script.Parent

--to make it move

for i = 0.1,.01 do
bullet:SetPrimaryPartCFrame(bullet:GetPrimaryPartCFrame() * CFrame.new(0,0,-i))
wait()
end

--to make it stop [optional]

while wait() do
bullet:SetPrimaryPartCFrame(bullet:GetPrimaryPartCFrame() * CFrame.new(0,0,0 +1))
 
end?

--Good luck --You should try it out too because I'm not sure it works 100%

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