Hey all,
I am currently trying to make a build system (for a tycoon game), and I have welded all parts of a model to one rootPart, and scripted it right, yet it is still not working.
Script:
local ProximityPromptService = game:GetService("ProximityPromptService")
obj = script.Parent
local function onPromptTriggered(obj, player)
-- TODO: set up cash system
local npc = game.ReplicatedStorage.NPCs:FindFirstChild(script.Parent.Parent.Name)
local newNpc = npc:Clone()
newNpc.Parent = game.Workspace
newNpc.rootPart.Position = script.Parent.Parent.whereGo.Position
--script.Hammering:Play()
--game.StarterGui:SetCore("SendNotification", {
-- Title = "Build";
-- Text = "Successfully built: "..script.Parent.Parent.Name.."!";
-- Duration = "3";
--})
script.Parent.Parent:Destroy()
end
ProximityPromptService.PromptTriggered:Connect(onPromptTriggered)
My model:
Any help is appreciated!
