In my game I'm developing, it teleports you to a farm thats NOT already taken (To prevent players from wandering around, trying to find an empty plot). I've used this small teleporting lines many times before - which is listed below (I was using a local script while using THIS code, so that could be a reason why it won't work.)
--LocalScript
local player = game.Players.LocalPlayer
local torso = player.Character.LowerTorso
torso.CFrame = -- Insert object path here
My script is here - inside ServerScriptService
--Script
game.Players.PlayerAdded:Connect(function(player)
local tele1 = game.Workspace.Plot.tele
local tele2 = game.Workspace.Plot2.tele
local tele3 = game.Workspace.Plot3.tele
local LowerTorso = player.Character.LowerTorso
if game.ReplicatedStorage.Farms["1"].Value == true then
if game.ReplicatedStorage.Farms["2"].Value == true then
LowerTorso.CFrame = tele3.CFrame
end
if game.ReplicatedStorage.Farms["2"].Value == false then
LowerTorso.CFrame = tele2.CFrame
end
else
LowerTorso.CFrame = tele1.CFrame
end
end)
I modified it a little, just so it would work in a normal script. But it still won't work. Te only thing the console says is 'Line 5'. If you could help, that would be a great! Thank you in advance.

3 comments
Now it's returning an error on this line - local Character = Player.Character or Player.CharacterAdded:Wait()
Also, I don't think that 'game.Players.LocalPlayer' works inside a Normal Script. Am I right?
"game.Players.LocalPlayer" works in LocalScripts only