Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make this GUI work correctly?

Asked by 8 years ago

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

0
What does the error say? AllianceScripter 30 — 8y
2
You are missing a comma between the UDim2 and 'Out' BlackJPI 2658 — 8y

Answer this question