I tried to make a script to clone an object from Replicated Storage and put it at the player's position. Here is my code:
local tool = script.Parent local poz = Workspace.Data.Player.Value.Character.UpperTorso.Position local object = game:GetService("ReplicatedStorage").GasterBlaster local function onActivate() local copy = object:Clone() copy.Parent = game.Workspace copy:MoveTo(poz) end
And this is are my objects
https://imgur.com/a/nl4O2Uv
It looks like you're getting the object incorrectly. Try using
local object = game.ReplicatedStorage:WaitForChild("GasterBlaster")
If you want it to teleport to the players position, then try doing this:
local player = script.Parent.Parent -- Add more parents until it points to the character local character = player.Character
Now, we use the teleport.
object.CFrame = character.HumanoidRootPart.CFrame
I hope this helped you, I did this out of pure memory, so it may not work, if it doesn't, then let me know by pinging me in the chat, or answering to my comment.
Try putting The script inside the serverstorage
Ok here is the new script I made but the blaster doesn't go to the player's position
active = 1 script.Parent.Activated:Connect(function() if active == 1 then active = 0 g = game.ReplicatedStorage.GasterBlaster:Clone() g.Parent = game.Workspace g.PrimaryPart = g.Beamer g:SetPrimaryPartCFrame(script.Parent.Parent["Torso"].CFrame * CFrame.new(0,0,-5) * CFrame.Angles(0.35,math.rad(180),0)) wait(1) active = 1 end end)