0% found this document useful (0 votes)
16 views1 page

Create a Speed Control GUI in Roblox

This document outlines a script for creating a user interface in Roblox that allows players to input a speed value. It includes a ScreenGui with a Frame, TextBox, TextLabel, and TextButton. When the button is clicked, the player's walk speed is updated based on the input from the TextBox.

Uploaded by

tamarigudzeziani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Create a Speed Control GUI in Roblox

This document outlines a script for creating a user interface in Roblox that allows players to input a speed value. It includes a ScreenGui with a Frame, TextBox, TextLabel, and TextButton. When the button is clicked, the player's walk speed is updated based on the input from the TextBox.

Uploaded by

tamarigudzeziani
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

-- Create a ScreenGui

local gui = [Link]("ScreenGui")


[Link] = "SpeedGUI"
[Link] = [Link]

-- Create a Frame
local frame = [Link]("Frame")
[Link] = [Link](0, 200, 0, 100)
[Link] = [Link](0, 10, 0.5, -50) -- Modified position to display on the
left side
frame.BackgroundColor3 = [Link](255, 255, 255)
[Link] = gui

-- Create a TextBox
local textBox = [Link]("TextBox")
[Link] = [Link](0, 150, 0, 30)
[Link] = [Link](0.5, -75, 0.2, 0)
[Link] = "Speed Amount"
[Link] = frame

-- Create a TextLabel
local label = [Link]("TextLabel")
[Link] = [Link](0, 150, 0, 30)
[Link] = [Link](0.5, -75, 0.4, 0)
[Link] = "Enter a speed value"
[Link] = frame

-- Create a TextButton
local button = [Link]("TextButton")
[Link] = [Link](0, 100, 0, 30)
[Link] = [Link](0.5, -50, 0.7, 0)
[Link] = "Go"
[Link] = frame

-- Function to update walk speed


local function updateWalkSpeed()
local speedValue = tonumber([Link])
if speedValue then
[Link] = speedValue
end
end

-- Bind the button click event


button.MouseButton1Click:Connect(updateWalkSpeed)

You might also like