I’ve been stuck on this for a while now and I can’t figure this out. I have a simple surface GUI (parented to the adorne in workspace)with a text button and a server script inside of it. The code is as simple as:
task.wait(5)
script.Parent.Activated:Connect(function()
print("CLICKED FROM SERVER") -- only prints when I run from server
end)
script.Parent.MouseEnter:Connect(function()
print("HOVERED FROM SERVER") -- prints
end)
And a client script too,
task.wait(5)
workspace:WaitForChild("UpgradesBillboard").SurfaceGui.TextButton.Activated:Connect(function()
print("CLICKED FROM CLIENT") -- doesn't print
end)
workspace:WaitForChild("UpgradesBillboard").SurfaceGui.TextButton.MouseEnter:Connect(function()
print("HOVERED FROM CLIENT") -- Prints
end)
However the client mouse button1 click does not print? I then tried and pasting the exact same model, with the surface gui and script etc, into another studio project and it worked. same hierarchy same code, but it didn’t work in the original project. I have a feeling its got something todo with the client getting messed up somewhere in the original game. Any ideas? Thanks!
Yeah, like I said I did the exact same thing in a different studio file and it worked, it just doesn’t work in this project file. I have no clue why. Everything is the same.
Are you sure there isn’t a different script possibly interfering. You also said this worked in a different program. That makes my think, reset the studio by restarting.