Hello! i would like it so that when a player steps on a button (using touch) it would change a variable in a localscript for that player. iv'e used binable events but that did it for all the players and not the one that was on the button. here is the touch code i am using for the button
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
--set variable to true
end
end
end)
here is the player code
hasPassengers = false

1 comment
where is the variable you want to change?