#soccer game
58 messages · Page 1 of 1 (latest)
you cant ask to create entire scripts
You can use hitboxes and cframe
Rule 4
There's a reason this channel is called scripting help
I have an gui ready an some script but i doesnt know how to work with it
** You are now Level 1! **
I have already one i just need to know how to work with it
could've said that in the first place
where'd you get it
if its from toolbox i cant help sorry
This is the gui script:
local playerCountries = {
"Argentina",
"Brazil",
"Germany",
"France",
"Italy",
"Spain",
}
local playerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local positionsFrame = Instance.new("Frame")
positionsFrame.Size = UDim2.new(0.2, 0, 0.2, 0)
positionsFrame.Position = UDim2.new(0.4, 0, 0.4, 0)
positionsFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
positionsFrame.Parent = playerGui
local dropdownList = Instance.new("UIListLayout", positionsFrame)
local function handleCountrySelection(country)
print("Player selected "..country.." as their country.")
positionsFrame.Visible = false
end
for _, country in ipairs(playerCountries) do
local countryButton = Instance.new("TextButton")
countryButton.Size = UDim2.new(1, 0, 0.2, 0)
countryButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
countryButton.TextColor3 = Color3.fromRGB(255, 255, 255)
countryButton.TextSize = 20
countryButton.Text = country
countryButton.Parent = positionsFrame
countryButton.MouseButton1Click:Connect(function()
handleCountrySelection(country)
end)
end
This is good?
What?
write your code like in the gif
local playerCountries = {
"Argentina",
"Brazil",
"Germany",
"France",
"Italy",
"Spain",
}
local playerGui = game.Players.LocalPlayer:WaitForChild("PlayerGui")
local positionsFrame = Instance.new("Frame")
positionsFrame.Size = UDim2.new(0.2, 0, 0.2, 0)
positionsFrame.Position = UDim2.new(0.4, 0, 0.4, 0)
positionsFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
positionsFrame.Parent = playerGui
local dropdownList = Instance.new("UIListLayout", positionsFrame)
local function handleCountrySelection(country)
print("Player selected "..country.." as their country.")
positionsFrame.Visible = false
end
for _, country in ipairs(playerCountries) do
local countryButton = Instance.new("TextButton")
countryButton.Size = UDim2.new(1, 0, 0.2, 0)
countryButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
countryButton.TextColor3 = Color3.fromRGB(255, 255, 255)
countryButton.TextSize = 20
countryButton.Text = country
countryButton.Parent = positionsFrame
countryButton.MouseButton1Click:Connect(function()
handleCountrySelection(country)
end)
end
Like this?
where'd you get it
it just creates a drop down list consisting of countries from which the player can choose
if the player clicks on any country that frame becomes invisible
at least thats what i understood from the script
I runned the game and it didnt show can you help me with that?
yeah because you never enabled it
How i does?
you need to write code to enable that frame (make it visible) through something
I have other code wait
you could use UserInputService to use a key to trigger the frame
Could you help me with that im new to this system
Im dumb asf
If you could help me more its will be thankful , but thank you mate
I dont have time for this
then dont make scripts?
Thank you anyway!
Anytime
Wait
** You are now Level 2! **
Could you teach me? @sinful kelp the basics ofc
Uh
well it takes practice ofc i cant teach you everything in a day
but sure
Not in a day
DM me
Learning to script is pain for me