Is there a game.Players.LocalPlayer type thing for a regular script, or anything else I could do to access a Player without a localscript?
I'm trying to make a Miner's Haven type game, and I'm getting stuck on adding the ore's value to a cash value in the leaderboard. Here's my script.
(If needed, this is a regular script in a part in the workspace)
local sellValue = 100
script.Parent.Touched:Connect(function(Toucher)
if Toucher:FindFirstChild("OreValue") then
local OreValue = Toucher.OreValue
print("The ore's value is " .. OreValue.Value)
OreValue.Value = OreValue.Value * sellValue
print("The ore was sold for " .. OreValue.Value)
--??? How to add to leaderboard
end
end)

1 comment
that worked. Thanks!