local dummy = workspace.Dummy
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
print("established locals")
script.Parent.Activated:Connect(function()
print("made func")
mouse.Button1Down:Connect(function()
print("recognized click")
game.ReplicatedStorage.Spawner:FireServer(mouse.Hit) -- removed plr here
end)
end)
--// Server script in ServerScriptService \\
local dummy = workspace.Dummy
game.ReplicatedStorage.Spawner.OnServerEvent:Connect(function(plr, oldmouse)
local new = dummy:Clone()
print("cloned")
new.HumanoidRootPart.CFrame = oldmouse
--The error is on this line ^^^
end)
local dummy = workspace.Dummy
game.ReplicatedStorage.Spawner.OnServerEvent:Connect(function(plr, oldmouse)
local new = dummy:Clone()
print("cloned")
new.HumanoidRootPart.CFrame = oldmouse
print("tped")
end)
does work but where it sets the CFrame to old mouse it doesn’t work. The script just passes right through it without any error or anything and continues the rest of the script.
once try replacing dummy with a part and see if that works…
local dummy = -- part
game.ReplicatedStorage.Spawner.OnServerEvent:Connect(function(plr, oldmouse)
local new = dummy:Clone()
print("cloned")
new.CFrame = oldmouse
print("tped")
end)
local dummy = -- part
game.ReplicatedStorage.Spawner.OnServerEvent:Connect(function(plr, oldmouse)
local new = dummy:Clone()
print("cloned")
new.Parent = game.Workspace
new.CFrame = oldmouse
print("tped")
end)