Hello So i am trying to make this script work for maybe already 2 days i asked others help they tried to help me but it still does not work in client roblox launcher but it does in studio Help me please?
local player = game.Players.LocalPlayer
local Character = player.Character or player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera
local spawns = workspace:WaitForChild("Map"):FindFirstChild("Spawns")
frame = script.Parent.Parent.Parent
function Click()
Camera.CameraType = Enum.CameraType.Custom
frame.Visible = false
local Spawns = spawns:GetChildren()
local Selected = Spawns[math.random(1,#Spawns)]
Character:MoveTo(Selected.Position + Vector3.new(0, 5, 0))
end
script.Parent.MouseButton1Down:Connect(Click)
script location https://imgur.com/a/8OHjwWP error https://imgur.com/a/RVNnaUf

2 comments
before u made the code a code block get ur code out, then mark ur text and put it in a code bock, that way its readable
you shouldn't have 2 variables be so similarly named like "spawns" and "Spawns". name them appropriately so that you don't accidentally use the wrong variable. maybe "spawnsModel" and "spawnParts"?