Hi, I want to use a pad to make a screen tween to a position and ask, "Are you sure you want to teleport?" Then when the player says yes it will disappear and teleport the player; if the player selects no, then the GUI will tween away and it will not teleport the player.

This is the script I have so far but the function gives me an error at line 8.

local frame = game.StarterGui.ToArenaScreenGui.ToArenaFrame
local yes = game.StarterGui.ToArenaScreenGui.ToArenaFrame.YesButton
local no = game.StarterGui.ToArenaScreenGui.ToArenaFrame.NoButton


script.Parent.Touched:connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		frame:TweenPosition(UDim2.new(0.35, 0,0.35, 0)'Out', 'Elastic', 1)
	end
end)

Ask me any questions if you are confused. Thank you for reading and helping me.

Sincerely, BloodySoldier2002

2 comments

0

What does the error say?

2

You are missing a comma between the UDim2 and 'Out'