An event that fires you click the button. It’s function is to print “Hello world” (I am just keeping it simple and clear, But the real function after the Event works is to change a textlabel Property)
When I start the game it tell’s me "Players.mustafahhh.PlayerGui.FontsUi.Frame.TextButton.LocalScript:10: attempt to index nil with ‘Connect’"
I tried to change the event, I tried to search at Developer hub. But I didn’t find solution so far
local Button = script.Parent
Button.Activated:Connect(function()
print('hello world')
end)
I will say it twice so you don’t miss understand. This is the not real function of this Event. But this is the most basic and simple thing I can so you understand where’s the problem. So you don’t get confused
Strings don’t even have Events Unless if you meant to call FindFirstChild() to check for that exact Name of the Button
local TextScaled = script.Parent.Parent.Parent.Text.TextScaled --?
local Button = script.Parent
local ButtonCheck = TextScaled:FindFirstChild(Button.Name)
if ButtonCheck then
ButtonCheck.Activated:Connect(function()
print("Hello world")
end)
end