This is a normal script inside my model It doesn't work though!
function onTouched(hit) local check = hit.Parent:FindFirstChild("Humanoid") if check ~= nil then local user = game.Players:GetPlayerFromCharacter(hit.Parent) game.Workspace.Model:MoveTo(Vector3.new(0,0,0)) end
Touched events can only be done by parts not entire models. You can make a transparent brick with no collision and place it over the entire model. I rewrote some code for you. Just take note of where I've placed the trigger, just being a direct child of the model.
local touchtrigger = script.Parent.TouchPart --You can rename touchtrigger and TouchPart anything, just point it to the correct area. -- -- touchtrigger is the invisible brick that will activate the model to move when touched. -- function onTouched(hit) script.Parent:MoveTo(Vector3.new(0,0,0)) -- I decided to use a script.Parent, that way you don't need to keep track of names.-- end touchtrigger.Touched:connect(onTouched) -- If you change "touchtrigger" at the top, you need to change it here too. --