repeat wait() until game.Players.LocalPlayer.Character ~= nil
wait(10)
local player = game.Players.LocalPlayer -- gets local player name in game.players
local localplayer = player.Character --finds local player in workspace
local stickplayertoflight = Instance.new("Part")
local model = script.Parent
local flames = script.Parent.FlameProducer.ParticleEmitter.Enabled
local players = game.Players
local randomflightpos = math.random(1,1)
if randomflightpos == 1 then
model:MoveTo(Vector3.new(-4021.037, 316.481, -1604.13)) --lobby position
if flames == false then --flames on
flames = true
end
if randomflightpos == 1 then -- position 1
model:MoveTo(Vector3.new(-4499.799, 1301.031, -1584.37))
for _, player in pairs(players:GetPlayers()) do
if player.Character then
player.Character:MoveTo(Vector3.new(-4499.799, 1326.331, -1584.37))
end
end
end
end
COMMUNITY QUESTION
Why does this script run only in solo mode but not in servers?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

6 comments
is this a local script or a script?
script
well then put it into a localscript since normal scripts cant get the local player
The local script did not work either
Please put all of the code in a code block.
code blocks are: ~