Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to get spawning through a tool to work?

I have been trying to spawn my part through Instance.new with a tool but it justs DOES NOT work no matter how I try. It worked last time but now it doesn't.

Here's the code:

local tool = script.Parent
local handle = tool:WaitForChild("Handle")
local players = game:GetService("Players").PlayerAdded:Wait(20)
local char = players.CharacterAdded:Wait(20)
local head = char.Head

tool.Activated:Connect(function()
	local molotov = Instance.new("Part")
	molotov.Parent = game.Workspace
	molotov.Position = handle.Position
end)

3 comments

0

Is the part spawning inside the workspace?

0

Is this a script or local script?

0

yes the part is spawning in workspace and its a script not local script

1 answer

I used remote events to spawn the parts, which is a way better method!

This discussion is preserved as it was. New answers, comments, and votes are closed.