Hi, first of all, sorry if I wrote the question incorrectly.So basically my other script manage to shoot a bullet, that's being cloned.
** So the problem is:**
-Everytime I press leftclick, a remoteEvent triggers, and a bullet is moving forward for a time, but
it gets more, and more far away, why?
What i'm trying to get:
-Evertyime I shoot, a cloned bullet is moving forward like a 100 stud, or something.
here's my first script, which needs fixing:
script.Parent.fire.OnServerEvent:Connect(function(player)
for i = 1,10 do
wait(0.5)
script.Parent.Bullet.Position = script.Parent.Bullet.Position + Vector3.new(0.5, 0, 0)
end
end)
And here's the other one which is, in my opinion is good( if it helps):
local fire = script.Parent:WaitForChild('fire')
fire.OnServerEvent:Connect(function(player)
local clone = script.Parent.Bullet:Clone()
clone.Parent = workspace
clone.Orientation = script.Parent.Handle.Orientation + Vector3.new(0, 90, 0)
clone.Transparency = 0
script.Parent.Lightgive.PointLight.Enabled = true
wait(0.1)
script.Parent.Lightgive.PointLight.Enabled = false
end)
Thanks for reading!
