You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
I am trying to get the player’s shirt and pants templates and save them to a string value so that they can be loaded in when the player wants them. -
What is the issue?
The issue is that the if statements for some reason don’t run. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried to look for solutions but there wasn’t much. There was no error so I couldn’t search up a specific error.
scriptp.Save_see.Save_load.MouseButton1Click:Connect(function()
if scriptp.Save_see.Folder:FindFirstChild("pant_"..Save_number).Value == nil then
print("if statement ran")
scriptp.Save_see.Folder:FindFirstChild("shirt_"..Save_number).Value = gameW:FindFirstChild(character).Shirt.ShirTemplate
scriptp.Save_see.Folder:FindFirstChild("pant"..Save_number).Value = gameW:FindFirstChild(character).Pants.PantsTemplate
scriptp.Save_see.Save_load.Text = "Load Save"
elseif scriptp.Save_see.Folder:FindFirstChild("pant_"..Save_number).Value == true then
print("shirt_"..Save_number)
gameW:FindFirstChild(character).Shirt.ShirtTemplate = scriptp.Save_see.Folder:FindFirstChild("shirt_"..Save_number).Value
gameW:FindFirstChild(character).Pants.PantsTemplate = scriptp.Save_see.Folder:FindFirstChild("pant"..Save_number).Value
end
print("done")
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.