Hello, i am trying to make it so that when a part is touched and that the name of the player that touched the part is equal to a stringvalue value then it fires a script. Thank you and merry christmas.
currentowner = script.Parent.Parent.CurrentOwner
script.Parent.Parent.PartFire.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")then
if hit.Parent.Name == currentowner.Value then
print ("hello world")
end
end)
:)

3 comments
Thank you ! Have a good one :)
No problem! You too :)
Could you please add me on discord ? I am trying to make a game and learn a bit of lua on the way and if you can help me i'll be really happy :) Baguette#0077