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

The Int.Value is higher than others but this does not teleport the player onto other place ?

--This is in a Localscript in the ScreenGui

screenGui = script.Parent

Background = screenGui.Background

Map1 = Background.map1
Map2 = Background.map2
Map3 = Background.map3

Vote1 = Background.Vote1
Vote2 = Background.Vote2
Vote3 = Background.Vote3

Votenum1 = Vote1.TextLabel
Votenum2 = Vote2.TextLabel
Votenum3 = Vote3.TextLabel

Int1 = Background.Int1
Int2 = Background.Int2
Int3 = Background.Int3
Voted = false
Map1.MouseButton1Click:connect(function(player)
	if  Voted == false then
	Votenum1.Text = Int1.Value + 1
	Int1.Value = Votenum1.Text
	end
	Voted = true
end)

Map2.MouseButton1Click:connect(function (player)
	if Voted == false then
		Votenum2.Text = Int2.Value + 1
	Int2.Value = Votenum2.Text
	end
	Voted = true
end)

Map3.MouseButton1Click:connect(function (player)
	if Voted == false then
		Votenum3.Text = Int3.Value + 1
	Int3.Value = Votenum3.Text
	end
	Voted = true
end)

wait(5)

local level1Id = 277142443
local TeleportService = game:GetService("TeleportService")

if Int1.Value > Int2.Value and Int3.Value then
	TeleportService:Teleport(level1Id, game.Players.Player1)

end

1 answer

✓ Accepted answer

If you are testing this in studio it wont teleport you. Also i see that on line 51 you are using game.Players.Player1 This should be game.Players.LocalPlayer

So in other words replace your line 51 with

TeleportService:Teleport(level1Id, game.Players.LocalPlayer)

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