I have a set of particles that are enabled in the use of keybinds.
These use LocalScripts located in StarterGui.
However, it is only visible to me, and no one else.
I am unaware of how to make the particles visible to an entire server.
Here is the script:
local userInputService = game:GetService("UserInputService")
local particle = game.Workspace.Fountains.FountainB.cannon.particleCore.fountain
userInputService.InputBegan:Connect(function(input, gp)
if gp then return end
if input.KeyCode == Enum.KeyCode.B then
particle.Enabled = true
end
end)
userInputService.InputEnded:Connect(function(input, gp)
if gp then return end
if input.KeyCode == Enum.KeyCode.B then
particle.Enabled = false
end
end)
This is a particle that enables when the B key is held.
Yet, it only shows for me, and no one else.
Is there any way to make it visible for everyone?
is there a reason why the LocalScript is in StarterGui when i dont find any lines about it?
just put the particle in ReplicatedStorage and do this
also put this script in starterplayer and startercharacterscripts
local userInputService = game:GetService(“UserInputService”)
local particle = game.ReplicatedStorage.YOURPARTICLENAMEHERE:Clone()
userInputService.InputBegan:Connect(function(input, gp)
if gp then return end
if input.KeyCode == Enum.KeyCode.B then
particle.Parent = script.Parent.Parent.Parent
end
end)
userInputService.InputEnded:Connect(function(input, gp)
if gp then return end
if input.KeyCode == Enum.KeyCode.B then
particle:Remove()
end
local userInputService = game:GetService(“UserInputService”)
local particle = game.ReplicatedStorage.YOURPARTICLENAMEHERE:Clone()
userInputService.InputBegan:Connect(function(input, gp)
if gp then return end
if input.KeyCode == Enum.KeyCode.B then
particle.Parent = script.Parent.Parent.Parent.Head
particle.Enabled = true
end
end)
userInputService.InputEnded:Connect(function(input, gp)
if gp then return end
if input.KeyCode == Enum.KeyCode.B then
particle:Remove()
end
end)
I think your code works if he wants to put the particle on the user’s avatar / head,but in this case he wants to put it for a model in workspace so remote event could fix the issue
I have figured this out already, so that first issue is done with.
But I did encounter another problem.
Now that I tied every LocalScript to a ServerScript, and the remote events, when I press a key, it enables every particle, instead of the corresponding particle.
Is there any way to specify which particle should fire with the remove events?
I disabled everything else except two of the particles that should enable separately.
But, they still play at the same time no matter which key I press.
Is this the correct setup? (first local, second server)