It dosent work in play but it works in play solo.
function hosecop() wait() player.Character.Torso.CFrame = CFrame.new(Vector3.new(5,10,10)) wait(1) player.Character.Humanoid.Health = 0 nextpage.Visible = false lastpage.Visible = false robberpage.Visible = false coppage.Visible = false wait() end chosecop.MouseButton1Down:connect(hosecop)
first, you need to declare what chosecop
is. Then you will need to declare player
, nextpage
, lastpage
and coppage
. That is why it's not working. Good try though!
chosecop.MouseButton1Click:connect(function(player) --Something gets clicked and the player is immediately defined. player.Character.Torso.CFrame = CFrame.new(5,10,10) --Moves the character to 5,10,10 player.Character.Humanoid.Health = 0 --kills the player end)