trying so when they touch a block this gui does preeeetttyyy stuff
local debounce = true local plr = game.Players.LocalPlayer print(debounce) game.Workspace.TouchMe.Touched:connect(function() if debounce == true then script.Parent.Background.Frame:TweenPosition(UDim2.new(0, 310, 0, 0) 'Out', 'Linear', 0.35) wait(0.2) script.Parent.Background.Frame:TweenPosition(UDim2.new(0, 0, 0, 0), 'In', 'Linear', 0.35) wait(0.2) script.Parent.Background.Frame:TweenSize(UDim2.new(1, 0, 1, 0), 'Out', 'Linerar', 0.5) end debounce = false print(debounce) end)
error
15:07:27.409 - Workspace.Gui.SurfaceGui.Manager:7: attempt to call a userdata value
i feel like a noob
You forgot a comma between UDim2.new() and 'Out' on line 7. Also, 'Linear' is misspelled on line 11.
local debounce = true local plr = game.Players.LocalPlayer print(debounce) game.Workspace.TouchMe.Touched:connect(function() if debounce == true then script.Parent.Background.Frame:TweenPosition(UDim2.new(0, 310, 0, 0), 'Out', 'Linear', 0.35) wait(0.2) script.Parent.Background.Frame:TweenPosition(UDim2.new(0, 0, 0, 0), 'In', 'Linear', 0.35) wait(0.2) script.Parent.Background.Frame:TweenSize(UDim2.new(1, 0, 1, 0), 'Out', 'Linear', 0.5) end debounce = false print(debounce) end)
Hope this helped.