I made a tool (model) which is a ticket. And I made an NPC giver who gives the tool, but it only gives the gear tool and not the model. This is how I layed it out in Workspace:
> --Workspace > --Dialog > --Script > --DialogChoice > --DialogChoice
The script:
function clicked(player, dialogChoice) print("Talked") print(player) print(dialogChoice) if dialogChoice.Name == "Ticket" then print("Player gives Ticket") g = game:GetService("InsertService"):LoadAsset(213984396) --Model ID number g.Parent = game.Workspace:FindFirstChild(player.Name) g:makeJoints() g:MoveTo(game.Workspace.FindFirstChild(player.Name).Head.Position) else print(dialogChoice) end end script.Parent.DialogChoiceSelected:connect(clicked)
This is the Model of a Tool link: http://www.roblox.com/Ticket-item?id=213984396
Thank you :D
The :MoveTo() function requires you to put Vector3.new(Vector3 position). You put the position, but not the "Vector3.new()" part. Here's a fix:
g:MoveTo(Vector3.new(game.Workspace.FindFirstChild(player.Name).Head.Position))