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

Why wont the button parent change?

Asked by 5 years ago
Edited 5 years ago
local plr = game:GetService("Players").LocalPlayer

debounce = false

script.Parent.MouseButton1Click:Connect(function()

if not debounce then

debounce = true

game.Workspace.Part.Value.Value = game.Workspace.Part.Value.Value - 25

wait(1)

debounce = false

end

if game.Workspace.Part.Value.Value == 0 then

game.Workspace.Part.Transparency = 1

plr.PlayerGui.ScreenGui.TextButton.Parent = game.Workspace.Part

wait(5)

game.Workspace.Part.Transparency = 0

game.Workspace.Part.Value.Value = 100

print(script:GetFullName())

end

end)

im not getting any error and the textbutton wont change its parent again its a local script in the textbutton btw

1
You are trying to use a localscript to put a GUI inside a part? If I understand correctly then that would be the issue I believe. Changes made via a localscript will not be sent to the server unless you use something like a Remote Event. vissequ 105 — 5y

Answer this question