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

How do I make this give a model tool instead of tool from gear?

Asked by 10 years ago

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

Answer this question