I'm working with SurfaceGUIs and i have to use a script for the button function, and that means i'd need to find a way to acess a local player using a script.
SCRIPT:
repeat wait() until game.Players.LocalPlayer ~= nil
local Player = game:GetService("Players").LocalPlayer
--\PLAYER VALUES/--
local CORE = Player.PlayerGui:WaitForChild("Core")
local Values = CORE:WaitForChild("Values")
local PaymentValue = Values:WaitForChild("PaymentValue")
local PaymentTime = Values:WaitForChild("PaymentTime")
local Employeed = Values:WaitForChild("Employeed")
--\TABEL VALUES/--
local Tabel = script.Parent.Parent
local TabelValues = Tabel:WaitForChild("Values")
local ShiftTime = TabelValues:WaitForChild("ShiftTime")
local Payment = TabelValues:WaitForChild("Payment")
script.Parent.MouseButton1Down:Connect(function()
if Employeed.Value == false then
Employeed.Value = true
PaymentTime = ShiftTime
PaymentValue = Payment
end
end)
I can explain the code in-case you wanna help.

3 comments
You should handle button clicking using a local script and any stat you want to change in a server script. Use a remote event to communicate to the server for that.
No, localplayer is never ever accessible through normal server scripts, only local scripts.
how about keep trying script.Parent or script.Parent.Parent and printing til you find the player