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

No Events And Functions Are Working When Fired Regarding A GUI?

So you can teleport somewhere in the same game (used a CFrame) and then there's a leave button, the problem is, when you press leave you're still sitting (you teleport into a seat for the first teleportation) and I've tried to get the character to unsit in this post: https://scriptinghelpers.org/questions/126022/how-do-you-set-a-players-sit-property-to-false-with-a-script

Not working, I even try to kill them like in this:

local BackToSpawnA = game.Workspace.GameSpace.BackToSpawnA

BackToSpawnA.Touched:Connect(function(Kill)
	if Kill and Kill.Parent:FindFirstChild("Humanoid") then
		Kill.Parent.Humanoid.Health = 0
	end
end)

It just doesn't work, it seems like the events are separated from the GUI somehow and don't fire, or the thing just isn't touching Humanoid (it probably is though)

Leaving GUI code:

LeaveButton.MouseButton1Click:Connect(function(Leaving)
	local BackToSpawn = CFrame.new(game.Workspace.GameSpace.BackToSpawnA.Position)
	HRP.CFrame = BackToSpawn
end)

1 answer

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