local player = {}
function touchmebaby(hit)
if hit.Parent:findFirstChild("Humanoid") then
local x = {}
local q = {game.Players}
for i, v in pairs(q):GetChildren() do
table.insert(x, "v.Name")
if v.Name == hit.Parent then
if v.leaderstats.Value == 1 then
v.leaderstats.Value =2
end
end
end
elseif hit.Parent.Parent.leaderstats.Level.Value < 2 then
return
end
end
script.Parent.Touched:connect(touchmebaby)
I want to get the player from the character after stepping on the part .-.

2 comments
Ah, that will work better than mine, faster, but I think the leaderstats value is an int? Wouldn't it be better to increment it like: player.leaderstats.Value = player.leaderstats.Value + 1?
It doesn't really matter, since you're only changing the value only if it's at 1.