I was making a start GUI for my game, but when I tested it it said "Attempt to call a string value" Here's the script:
Player = game.Players.LocalPlayer Background = script.Parent.Parent:WaitForChild("Background") Play = script.Parent function OnClicked() Background.Visible = false end Play.MouseButton1Down:connect("OnClicked")
Thanks!
Error on line 9 should be
Play.MouseButton1Down:connect(OnClicked)-- no abbreviations needed because it's a unctions name not string
Change this:
Play.MouseButton1Down:connect("OnClicked")
to this:
Play.MouseButton1Down:connect(OnClicked)
You put a string value, into the :connect function. It won't work, because that doesn't receive strings. It can only be just the name of a function like that. Hope it works, and I also hope I helped!