RemoteFunction.new("CreateField", function(player, ID, FieldName, FieldLoc, FieldLogoId)
local CheckOwner = getGroupInfo(ID)
if CheckOwner.Owner.Id == player.UserId then
local filteredName, nameHasHash = CheckText(FieldName, player)
local filteredLoc, locHasHash = CheckText(FieldLoc, player)
local IsNameGood = not nameHasHash
local IsLocGood = not locHasHash
-- If either is bad, return early
if not IsNameGood or not IsLocGood then
return false, IsNameGood, IsLocGood, filteredName, filteredLoc, FieldLogoId
end
warn("Filtered Name:", filteredName)
warn("Filtered Location:", filteredLoc)
warn("Logo ID:", FieldLogoId)
-- Store in DataStore or do logic
local GetData = LeagueFields:GetAsync(ID)
-- ...rest of your logic
return true, true, IsLocGood, filteredName, filteredLoc, FieldLogoId
end
end)
thats server
FieldCreator.GroupCreateConfirm.TextButton.MouseButton1Click:Connect(function()
if CurrentTab == "CreatingField" then
local success, isNameGood, isLocGood, name, loc, logoId = CreateField:Fire(CurrentGroup, FieldCreator.Frame.FieldName.TextBox.Text,FieldCreator.Frame.FieldLoc.TextBox.Text, FieldCreator.Frame.FieldLogo.TextBox.Text )
if success then
print(isNameGood)
print(isLocGood)
end
end
end)
this local
why wont it print all my stuff
just prints
true andnil