First, i have a table on the module script, on the script inside the GUI, i set a MouseButton1Click event on the GUI, after clicking, it will teleport us and insert our name to the table, but something went wrong, i expected it will have 1 player on the table but it got more eventhough i just click it one time
Here's my script:
local join = script.Parent
local plrjoin = require(game.ServerStorage.ModuleScript)
game.Workspace.Lobby.Floor.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
join.Visible = true
join.MouseButton1Click:Connect(function()
local LowerTorso = hit.Parent.LowerTorso
LowerTorso.CFrame = game.Workspace.Lobby.SpawnToTeleportPlace.CFrame
join.Visible = false
end)
end
end)
Also i cant use the LocalScript because i cant use require() on it

1 comment
oops, i forgot the table.insert(plrjoin,1,hit.Parent.Name) at the end, sorry guys