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

6 comments

0

is this a local script or a script?

0

script

0

well then put it into a localscript since normal scripts cant get the local player

0

The local script did not work either

0

Please put all of the code in a code block.

0

code blocks are: ~