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

Detecting If A Player Is Good Or Bad To Give Them A Item?

Asked by 4 years ago
Edited 4 years ago

Hello! This Is My First post Thing And Im Trying To Make Game And Im Trying To Give The Player And Item Only If They Have The Survivor Tag In Them But Every Time The Killer Tries To pick It Up It Deosnt Print("Was The Killer") But Instead Makes It So That Nobody Can Pick It Up Even if They Are The Survivor Please Help.

Script:

local tool = game.ServerStorage.PlankTool
local klone = tool:Clone()

script.Parent.ClickDetector.MouseClick:Connect(function(plr)
    if klone.Parent ~= plr.Backpack then
        if plr.SurvivorTag then
            klone.Parent = plr.Backpack
            script.Parent.Transparency = 1
            print("Was Player")
        else
            print("Was The Killer")
        end
    end
end)

Answer this question