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

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

Asked by 2 years ago

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

0
*this* kurtenaad 0 — 2y
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) kurtenaad 0 — 2y
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 kurtenaad 0 — 2y
0
someone help plz kurtenaad 0 — 2y
View all comments (2 more)
0
you cant detect touch events on models TehEpixNeon 0 — 2y
0
try putting your script inside a 'hitbox' part TehEpixNeon 0 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

You can't detect Touched events on models.

Try putting the script inside a "hitbox" part.

Ad

Answer this question