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-- it wont find the local player wait(5) game.Workspace.Part.Transparency = 0 game.Workspace.Part.Value.Value = 100 print(script:GetFullName()) end end)
You can't use the LocalPlayer in a (Server)Script, only LocalScripts.
And, looking at script.Parent.MouseButton1Click:Connect(function()
,
you seem to be using this in a GUI.
If that is true, you'll have to use a localscript as (server)scripts don't work in GUIs.
If the problem is FilteringEnabled being forced, you can use remotes.