Hi Everyone!
I’m trying to clone a shovel (its just a single part) from server storage done on a serverscript in serverscriptservice, and parent it to the player in workspace (example game.Workspace.Player01) however I get some error. Any help is appreciated thanks!
Code:
game.Players.PlayerAdded:Connect(function(player)
local shovel = game.ServerStorage.ShovelStorage.DefaultShovel:Clone()
shovel.Name = "DefaultShovel"
shovel.Parent = game.Workspace[player.Name]
shovel.Orientation = shovel.Orientation + Vector3.new(-90,0,0)
while wait() do
shovel.CFrame = game.Workspace[player.Name].RightHand.CFrame + Vector3.new(0,0,-1)
end
end)
-- Error: MasterWindowz7And10 is not a valid member of Workspace "Workspace"