Hi there! I made a Teleport GUI. And everything I made was perfect but ever since I put the ScreenGui to ReplicatedStorage because I only want it to myself. Anyway I'm having trouble in Line 6 of this Script:
spawn = game.Workspace.HouseArea
player = script.Parent.Parent.Parent.Parent
local funtcion onClicked()
local spawnArea = game.Workspace.HouseArea;
local playerList = game.Players:GetChildren; --It keeps saying function arguments expected near ":"
local playerToTeleport = nil;
for key, value in pairs(playerList) do
playerToTeleport = game.Workspace:FindFirstChild(value.Name);
if playerToTeleport ~= nill then
player.Torso.CFrame = CFrame.new(spawnArea.Position);
end
end
end
script.Parent.MouseButton1Down:connect(onClicked)
Please Help

1 comment
Sir now i have problem in Line 15