Im trying to make a camping game with tent but when I try to make tent it gives this error (on title), how can I fix it?
LocalScript code: --By enes223
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:wait()
local torso = char:WaitForChild("Torso")
local RS = game:GetService("ReplicatedStorage")
local Remote = RS:WaitForChild("BuildTent")
local Remote2 = RS:WaitForChild("BuildMegaTent")
script.Parent.MouseButton1Click:Connect(function()
if plr.Values.TentLevel.Value == 1 or 2 then
local position = torso.Position
script.Parent.Visible = false
Remote:FireServer(position)
elseif plr.Values.TentLevel.Value == 3 then
local position = torso.CFrame.lookVector + Vector3.new(0,0,10) * 0
Remote2:FireServer(position)
end
end)
ServerScript code:
BuildTent.OnServerEvent:connect(function(plr,position)
local tent = SS:WaitForChild("Tent")
local clone = tent:Clone()
clone.Parent = game.Workspace
clone.Name = plr.Name.."'s Tent"
clone.TentMesh.CFrame = position
clone.TentMesh1.CFrame = position
end)

2 comments
CFrame.new(position)
This is also an option I forgot to mention.