So i want to make a game where you can slow down time. Now i have made a gun following a tutorial of avlin blox. The only problem for me is, how can i make that gun shot visible, like a bullet, and can i slow it down?
1 Like
This might now be the best solution, but you can use a tween, and in the tweeninfo you can just make the time long, giving the effect that it’s moving in slow motion.
the script would be nice. no one can help without it.
1 Like
Maybe slowing down the Velocity of the bullet when the time slowed down?
For example, create a “NumberValue” in Replicated Storage which has the usual value of 1, and change it every time you slow down the time, if you want it to be half as slow, put 0.5 (this was probably redundant), and multiply the bullet speed by this value
script.Parent.Fire.OnServerEvent:Connect(function(player,mousePos)
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {player.Character}
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
local raycastResults = workspace:Raycast(script.Parent.BULLETSHAFT.Position,(mousePos - script.Parent.Handle.Position)*300,raycastParams)
if raycastResults then
local hitPart = raycastResults.Instance
local model = hitPart:FindFirstAncestorOfClass("Model")
if model then
if model:FindFistChild("Humanoid") then
model.Humanoid.Health -= 25
end
end
end
end)
this is the (server script) …