#SurfaceGUI Button Problem
1 messages · Page 1 of 1 (latest)
Script?
local button = script.Parent
button.MouseButton1Click:Connect(function()
print("Hello World")
end)
very simple.
idk the issue
script.parent being the button
Activated is a better practice than mousebutton1click
local button = script.Parent
button.Activated:Connect(function()
print("Hello World")
end)
nothing prints when i click it
its legit just meant to print "Hello world" when i press the buy button.
ur using a local right
oh
** You are now Level 4! **
...
yes inside the button
dude you cant use local scripts in workspace
how am i meant to make it work then
i jst want it to print hello world when they click it
use it in starterplayer or starter character scripts
yea
so i just change local button = script.Parent to the path to it?
yea
yes
manualy 😭
legit workspace.Map.Area1________
yea
alr
you can only use local scripts inside starterplayer, startergui and starterpack
12:03:46.823 MainBoard is not a valid member of Model "Workspace.Map.Area1.StarterArea.UpgradeBoards.MainBoards.Important.Upgrades" - Client - LocalScript:1
local button = workspace.Map.Area1.StarterArea.UpgradeBoards.MainBoards.Important.Upgrades.MainBoard.Upgrades.Main.CurrencyIncrease.Buy
button.Activated:Connect(function()
print("Hello World")
end)
its the part tho
im confuzzled
ok
on server scripts everything is there
** You are now Level 1! **
nope