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

Why particles are invisible for a other players?

Asked by
lolenko 17
4 years ago
local uis = game:GetService("UserInputService")
local player = game.Players.LocalPlayer
local char = player.Character

uis.InputBegan:Connect(function(input, gameProcessedEvent)
    if input.UserInputType == Enum.UserInputType.Keyboard then
        if input.KeyCode == Enum.KeyCode.Z then
            print("Vso okay")
            local bups = game.ReplicatedStorage.ParticleEmitter:Clone()
            local bups1 = game.ReplicatedStorage.ParticleEmitter:Clone()
            local bups2 = game.ReplicatedStorage.ParticleEmitter:Clone()
            local bups3 = game.ReplicatedStorage.ParticleEmitter:Clone()
            local bups4 = game.ReplicatedStorage.ParticleEmitter:Clone()
            local bups5 = game.ReplicatedStorage.ParticleEmitter:Clone()
            local bups6 = game.ReplicatedStorage.ParticleEmitter:Clone()
            local bups7 = game.ReplicatedStorage.ParticleEmitter:Clone()
            local bups8 = game.ReplicatedStorage.ParticleEmitter:Clone()
            local bups9 = game.ReplicatedStorage.ParticleEmitter:Clone()
            bups.Parent = char.LeftHand
            bups1.Parent = char.LeftHand
            bups2.Parent = char.LeftHand
            bups3.Parent = char.LeftHand
            bups4.Parent = char.LeftHand
            bups5.Parent = char.LeftHand
            bups6.Parent = char.LeftHand
            bups7.Parent = char.LeftHand
            bups8.Parent = char.LeftHand
            bups9.Parent = char.LeftHand
            script.Parent.MouseGiver.Disabled = false
        end 
    end
end)
uis.InputEnded:Connect(function(input, gameProcessedEvent)
    if input.UserInputType == Enum.UserInputType.Keyboard then
        if input.KeyCode == Enum.KeyCode.Z then
            print("Vso ploha")

            for i = 1,15 do
                wait(.0001)
                char.LeftHand.ParticleEmitter:Destroy()
                char.RightHand.ParticleEmitter:Destroy()
                script.Parent.MouseGiver.Disabled = true
            end
        end 
    end
end)


When i am activaiting fire, other players don't see him. Why?

0
Are you using a localscript or a script? banaaneman2000 5 — 4y
0
local lolenko 17 — 4y
0
That says everyting, you are doing it localy for that player, so it won't clone or do anything for other players, try doing it in a script or using events! banaaneman2000 5 — 4y
0
Thanks! lolenko 17 — 4y
0
use remote event or just make it a server script Il_5x5 10 — 4y

1 answer

Log in to vote
2
Answered by
2_MMZ 1059 Moderation Voter
4 years ago

Here's your problem, if you're going to use a Local Script, it's only client sided, and won't appear for other players, only on the main persons screen. What I'd suggest doing is removing the ParticleEmitter clones, and when the button "Z" is pressed, in the new script that isn't Local, will be enabled, and inside that script will include the particle emitter clones, but be sure the script (not local) is disabled, it will only be enabled on button press Z.

Ad

Answer this question