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

Anybody know why this script in Server Script Service isnt working?

local servScriServ = game:GetService("ServerScriptService")
for i,v in pairs(game.Workspace.Hodel:GetChildren()) do
	if v.Name == "taw" then
		local newScript = servScriServ.SAH:Clone() --make sure this refers to the script itself
		newScript.Parent = v
	end
end

Basically im trying to make it copy and paste a script called SAH into all parts inside of Hodel named taw, the script is in server script service, why is it not working

2 comments

0

works for me, make sure everything is named correctly AND use :GetDescendants() for this

0

is it worth noting that i have the SAH script inside click detector?

1 answer

The script you are writing should be a normal script because localscripts does not have access to server script service and server storage.

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