Ad
Log in to vote
0

"Touched is not a valid member of Model "Workspace. ""?

Asked by 21 days ago

When i add my badge script is says "Touched is not a valid member of Model "Workspace. "" this is my script:

local BadgeService = game:GetService("BadgeService")
local Players = game:GetService("Players")

local Part = script.Parent
local IDToAward = 2129399776

local debounce = true

Part.Touched:Connect(function(Hit)
    local Player = Players:GetPlayerFromCharacter(Hit.Parent)
    if not Player or BadgeService:UserHasBadgeAsync(Player.UserId, IDToAward) or not debounce then
        return
    end
    debounce = false
    BadgeService:AwardBadge(Player.UserId, IDToAward)
    wait(5)
    debounce = true
end)

0
Where is your script located NykoVania 198 — 21d
0
inside the thing im trying to touch PeterParker17386 14 — 21d
0
Can you do Print(Part.Name) and tell me the output? NykoVania 198 — 21d
0
Try script.Parent.Touched if your directory is being mixed up with others on accident. manith513 61 — 18d

Answer this question