New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

How to make this script fire items so other players can see?

Asked by 14 days ago

This script is local, only the local player can see. I know that a remote event can help other players see. I don't know how due to the velocity of the part. Do I make a new part in the server and add the body velocity there and send the coordinates or is there an easier way? I cannot figure it out.

Here is the PART of the local script, this is the main function and this is activated when the tool connects:

function mouseDownFunction()
    local Debounce = false
----------------------------------------------------------------------------------
    local clone = ship:Clone()
    clone.Parent = game.Workspace
    clone.Name = player.Character.Name.."Part"
    clone.Position = character.Position + Vector3.new(5,0,0)
----------------------------------------------------------------------------------  
    local bv = Instance.new("BodyVelocity")
    bv.Parent = clone 
    bv.MaxForce = Vector3.new(1e8,1e8,1e8) 
    local mousePos = mouse.Hit.p - Vector3.new(5,0,0)
    bv.Velocity = (mousePos - character.Position).unit * speed--(mouse.hit.p - character.Position).unit * speed
----------------------------------------------------------------------------------
    local sparkes = Instance.new("ParticleEmitter", clone)
    sparkes.Size = NumberSequence.new(5)
    clone.CanCollide = false    
------------------------------------------------------------------------------      
    clone.Touched:Connect(function(hit)
        if hit.Parent:FindFirstChild("Humanoid") and Debounce == false then 
            if hit.Parent ~= player.Character.Name then
                hit.Parent.Humanoid:TakeDamage(damage)
                clone:Destroy()
            end
        end
    end)    
end

Thanks for the Help!

0
You'll need to create the projectile on the server, yes. Feahren 3662 — 14d
0
there are multiple videos on youtube that show how to do this Oblivious_Blitz 1 — 14d

Answer this question