I'm trying to make a part spawn in a model from ServerStorage when touched. I can't figure out what I'm doing wrong, please excuse my ignorance.
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
function SpawnModel()
model = game.ServerStorage.Model:clone()
model.Parent = game.Workspace
model:MoveTo(spawn.Position)
end
end)
Thanks.
EDIT: Nevermind, I fiddled around and I eventually got it to work with this:
script.Parent.Touched:connect (function()
function SpawnModel()
model = game.ServerStorage.Model:Clone()
model.Parent = workspace
end
SpawnModel()
end)

3 comments
stop begging
Thanks for your help, but that hasn't gotten it to work correctly either. I can get it to work with a click detector for some reason, but not on touch.
Well, I'm keen in fixing this issue since I've already tried, so please, tell me what you can figure out about what's not working