Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

help im stuck i have made thit coin made out of unions but cat get it to work i cant pick it up

6 comments

0

this

0

the script: local db = true script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then if db == true then db = false script.Parent.Transparency = 1 local player = game.Players:GetPlayerFromCharacter(hit.Parent) player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 1 script.Sound:Play() script.Parent.Transparency = 1 wait(1)

0

local db = true script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then if db == true then db = false script.Parent.Transparency = 1 local player = game.Players:GetPlayerFromCharacter(hit.Parent) player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + 1 script.Sound:Play() script.Parent.Transparency = 1 wait(1) db = true

0

someone help plz

0

you cant detect touch events on models

0

try putting your script inside a 'hitbox' part

1 answer

You can't detect Touched events on models.

Try putting the script inside a "hitbox" part.

This discussion is preserved as it was. New answers, comments, and votes are closed.