I'm making a game and right now I've made a TextButton of course. For some reason when I click it, it won't fire the print. Even if I hover my mouse over it won't darken as it's supposed to. I've checked my code multiple times for bugs. I've even tried remaking the script and the TextButton. Here's my code in case there are bugs.
local Button = script.Parent.TextButton Button.MouseButton1Up:Connect(function() print ("Success so far!") end)
In your code, everything up to line 3 is right. Instead of writing "MouseButton1Up", try writing "MouseButton1Click" instead. Here is your edited code:
local Button = script.Parent.TextButton Button.MouseButton1Click:Connect(function() print("Success so far!") end)
-- Services local UserInputService = game:GetService("UserInputService") -- GUI Elements -- your gui code bla bla bla -- Player's Mouse local mouse = game.Players.LocalPlayer:GetMouse() -- Global boolean indicating whether player's MouseButton1 is down local hold = false function -- code bla bla bla if hold == false then return end -- work off this ^ -- clode bla bla end
also why tf do you have a space in print