Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My Surface Gui button doesn't work . What do i do?

Asked by 6 years ago
Edited 6 years ago

When I click The Button on The surface gui it doesn't give me the key. If you would like to see a video please let me know. (Also does anyone have an idea on how to make the text change to the persons name when clicked and reset if the player leaves the game and if the players already has a key it doesn't clone more into the player's backpack when pressed)

local p = game.Players.LocalPlayer

script.Parent.MouseButton1Click:connect(function()
 local tool = game.Lighting.Key:Clone()
 tool.Parent = p.Backpack
end)

0
can i have the error it gives or does it not give any error? popthecorn145 16 — 6y
0
No errors given 1freshkidz1 12 — 6y
0
You linked me to the wiki but there's nothing there that helps 1freshkidz1 12 — 6y
0
Sorry. qq I forgot to note that it states: "However, ServerStorage and ReplicatedStorage should now be used for this purpose instead." in the page. TheeDeathCaster 2368 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

So first, you want to put the surfacegui in StarterGui, and set the Adornee to the part that you want the SurfaceGui to be on, then it should work!

0
thanks that worked, do you mind if i ask another question 1freshkidz1 12 — 6y
Ad

Answer this question