Works perfectly in roblox studio but does not work in servers/game. It is a script not localscript

repeat wait() until game.Players.LocalPlayer
wait(1)
repeat wait() until game.Players.LocalPlayer.Character
wait(1)
local model = script.Parent.Parent
local container = script.Parent
local particles = Instance.new("ParticleEmitter")
particles.Parent = model
local function createparticleclone()
particles:Clone()
particles.Parent = game.Players.LocalPlayer.Character.LeftFoot 
end

do
createparticleclone()
end
local function createparticleclone()
particles:Clone()
particles.Parent = game.Players.LocalPlayer.Character.RightFoot
end

do
createparticleclone()
end

1 comment

0

Then it will error because LocalPlayer is nil on the server