So far this is the script i have.
local player = game:GetService("Players").LocalPlayer local replicatedStorage = game:GetService("ReplicatedStorage") local mouse = player.GetMouse() mouse.Button1Down:Connect(function() game.Workspace.GetObject(replicatedStorage.FindFirstChild("Part")) end)
This is a local script placed in the player's starter pack. Is there a way to spawn in the part at a position where i want it? The Part won't even spawn in. I want the code to have the part be cloned and spawn in the sky when the player left clicks. I have not attempted the clone part yet, as I need to make sure one block can spawn.
I think this is what you want.
local player = game:GetService("Players").LocalPlayer local replicatedStorage = game:GetService("ReplicatedStorage") local mouse = player:GetMouse() local p001 = replicatedStorage.Part mouse.Button1Down:Connect(function() p001:clone().Parent = game.Workspace end)
I don't really understand what you want besides cloning a block in the sky, however I made this just incase you wanted it to be cloned to wherever you click.
local player = game:GetService("Players").LocalPlayer local replicatedStorage = game:GetService("ReplicatedStorage") local mouse = player:GetMouse() local prt = replicatedStorage.Part mouse.Button1Down:Connect(function() local p001 = prt:Clone() p001.Parent = workspace p001.Position = ms.Hit.p end)