Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Whats wrong with this function?

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)

1 answer

first, you need to declare what chosecop is. Then you will need to declare player, nextpage, lastpageand 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)

This discussion is preserved as it was. New answers, comments, and votes are closed.