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 comment
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.