local Players = game:GetService("Players")
local function onPartTouch(otherPart)
local partParent = otherPart.Parent
local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
local player = Players:GetPlayerFromCharacter(partParent)
if humanoid then
if player.TokenFile.WaterfallToken1.Value == false then
script.Parent.Transparency = 1
script.Parent.CanCollide = false
local leaderstats = player.leaderstats
local findcoins = leaderstats and leaderstats:FindFirstChild("coinz")
local coinz4m = math.random(10,50)
if findcoins then
findcoins.Value = findcoins.Value + coinz4m
player.TokenFile.WaterfallToken1.Value = true
end
end
end
end
script.Parent.Touched:Connect(onPartTouch)
Not sure if I'm accessing the model or the player in game.Players. It should be game.Players though. If you need any other scripts such as the leaderstats scripts, i'd be happy to supply them. I'm also not getting any errors, works fine without the
if player.TokenFile.WaterfallToken1.Value == false then
--code here
end
but it is kind of a critical part of what I'm working on.

2 comments
Other information required.Since just only seeing this script looks flawless
Ok, ill send the other relating scripts