Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My "Effects one player" script not working, how can I fix this?

Asked by 2 years ago

Hello robloxains! Im making a script that does a function only If you the player either touches It or clicks on It the problem? It appears to not work as attended Im new to scripting and I don't really know anything about scripting.

The script:

local Players = game:GetService("Players")

script.Parent.Touched:Connect(function(hit)
    if Player.Name == hit.Parent.Name then
        print:("Test")
    end
end)

Btw If you don't userstand me I want to make a script that will not effect anyone exepct for you If you click or touch the part

Answer this question