Hey im new to the scripting helpers plus new to roblox studio scripting so i need a little help from you. Well , i need a LocalGui to appear when you click a part , (i have the clickdetector done and i have tested it with print) but its not working for me ( on the second line there is my name because idont know how to get there localplayer
function OnClick()
playerfind = game.Players:FindFirstChild(script.Parent.Parent.Anto3oo.Name.Value)
guiclone = script.Buyframe:clone()
guiclone.Parent.Parent.Parent = playerfind.PlayerGui
end
script.Parent.ClickDetector.MouseClick:connect(OnClick)
The location of the script is
game.Workspace.Blender.script
And the gui is
game.Workspace.Blender.script.BuyFrame

6 comments
Props to this one
now usually this wouldnt work cuz serverscripts cant see playergui.. but apparently now it can? am confused
Server can add to the PlayerGui which is all I'm doing. Nothing is new here.
@Imperialy, the server cannot access existing members of the PlayerGui. It can add to it, though, and of course access those members.
Thanks so much! didnt know someone would help me that fast , thanks anyway
Assuming you have my exact code, it should be a server Script inside the Part you click with a ClickDetector in that Part too. Make sure your "Buyframe" is inside the script so it can clone it. Read the hierarchy path in the script to see what I mean.