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

Why does my part spawning part not working? Pls Help!

local spawnpoint = script.Parent.TargetPart
local cooldown = false

script.Parent.Activated:Connect(function()
	if cooldown == false then
		cooldown = true
		local clone = game.ServerStorage.FinishedWeapons.Lvl1lazer.Ammo:Clone()
		local cf = spawnpoint.CFrame
		clone:SetPrimaryPartCFrame(cf)
		clone.Parent = game.Workspace
		wait(1)
		cooldown = false
	end
end)

2 comments

0

how is this script being activated??

0

i click the tool and it spawns a part from the severstorage

1 answer

If the script is a localScript, then you'll need to move the object from ServerStorage to ReplicatedStorage, you can't access ServerStorage from the client.

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