Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why won't this surface gui script work ingame but works in studio with no output response?

Hello, I've already read the guide as to why things don't work in-game but work in-studio. This is a normal script ( I've already tried a local script ) inside a surfacegui. Please Help, Thanks.

This is the script:



 
script.Parent.MouseButton1Click:connect(function()
	
	

local player = game.Players.LocalPlayer
	local newframething = script.Parent.Parent.Parent.Parent.BidNowFrame:clone()
	newframething.Parent = player.PlayerGui.PlayerScreenGui
	
	
	

end)

1 comment

0

Scripts don't have access to game.Players.LocalPlayer, only LocalScripts do

1 answer

✓ Accepted answer

You can put the SurfaceGui inside of the players PlayerGui, and set its Adornee to the part you want it on. Then you're able to use a localscript to modify & change the ui however you want, and only that player will see their individual changes!

2 comments

0

Thanks bro, helped a lot.

0

Np

This discussion is preserved as it was. New answers, comments, and votes are closed.