I have these scripts that don't work in actual servers. They work when I go in test mode in the studio. Script 1:
script.Parent.Touched:connect(function(hit)
script.Parent.Transparency = 1
script.Parent.Parent.Gold1.Transparency = 1
script.Parent.Parent.Gold2.Transparency = 1
script.Parent.Parent.Chest.Transparency = 1
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
game.Players.LocalPlayer.leaderstats.Beli.Value = game.Players.LocalPlayer.leaderstats.Beli.Value + 6
game.Players.LocalPlayer.leaderstats.Bounty.Value = game.Players.LocalPlayer.leaderstats.Bounty.Value + 14
wait()
end
wait()
script.Parent.Transparency = 0
script.Parent.Parent.Chest.Transparency = 0
script.Parent.Parent.Gold1.Transparency = 0
script.Parent.Parent.Gold2.Transparency = 0
wait()
script.Parent.Parent.Coverer.CanCollide = true
script.Parent.Parent.Coverer.Transparency = 0
wait(30)
script.Parent.Parent.Coverer.Transparency = 1
script.Parent.Parent.Coverer.CanCollide = false
end)
-- Ik I got too many parents but its still fine
Script 2:
script.Parent.MouseClick:connect(function()
wait()
if game.Players.LocalPlayer.leaderstats.Beli.Value >= 50 then
game.Players.LocalPlayer.leaderstats.Beli.Value = game.Players.LocalPlayer.leaderstats.Beli.Value - 50
script.Parent.Parent.Transparency = 1
wait()
script.Parent.Parent.CanCollide = false
wait(2.5)
script.Parent.Parent.Transparency = 0
wait()
script.Parent.Parent.CanCollide = true
print("Bought")
else
print("Not enough Beli")
end
end)
-- 2 many parents again, but it works in offline mode
Please answer?

4 comments
Are these both LocalScripts? LocalPlayer is only accessible in live servers from LocalScripts.
No, normal scripts.
I tried them with a local script, and it still didn't work.
You can only access "LocalPlayer" in LocalScripts, and LocalScripts don't run in Workspace. You're going to have to make some large edits so you can get the player correctly.