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

How to create Moving Projectiles?

Hey, so I'm practicing and training my scripting skills by implementing different concepts to the script I created. Furthermore, I'm trying to make a object move at a certain speed, certain action, and etc. For example, if I touch the object it will move maybe west. Here is the script: [Please excuse the language I was bored ok]


script.Parent.Touched:Connect(function(part)

if part.Parent:findFirstChild("Humanoid") then

part.Parent.Humanoid.Health = 0

if part.Parent.Humanoid.Health then

local lmaogay = game.Workspace

part.Parent = game.Workspace

script.Parent.BrickColor = BrickColor.new("Really blue")

script.Parent.Size = Vector3.new(100,100,100)

wait(3)

if script.Parent.Size then

script.Parent.Size = Vector3.new(1,1,1)

end

end

end

end)


1 answer

well to make the partmove you need bodyvelocity so u type

local body = Instance.new("BodyVelocity")
body.Parent = script.Parent
body.MaxForce = Vector3.new(force in here)

5 comments

0

i didnt know vector3 can be used for other things than size?

0

yes but here its used for changing or setting the force

0

dosent work

0

it does

0

but the bigger part you have the bigger maxforce you need, a small part can easily be moved with a small maxforce but a big part cant be moved with that small maxforce

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