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

How to create Moving Projectiles?

Asked by 5 years ago

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

Log in to vote
0
Answered by 5 years ago

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)
0
i didnt know vector3 can be used for other things than size? T0BIUCHIHAA 11 — 5y
0
yes but here its used for changing or setting the force Gameplayer365247v2 1055 — 5y
0
dosent work T0BIUCHIHAA 11 — 5y
0
it does Gameplayer365247v2 1055 — 5y
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 Gameplayer365247v2 1055 — 5y
Ad

Answer this question