Slider to TopParamB

How would I go with making a slider (gui) that converts to TopParamB of a specific part?

1 Like

This should help. I added notes that’ll give you an understanding.

--get a reference to the part you want to modify
local part = workspace.Part1

-- Create a ScreenGUI object to hold the slider
local gui ="ScreenGui")
gui.Parent = game.Players.LocalPlayer.PlayerGui

-- Create a frame to hold the slider
local frame ="Frame")
frame.Size =, 200, 0, 20)
frame.BackgroundTransparency = 0.5
frame.BackgroundColor3 =, 1, 1)
frame.Position =, -100, 0.5, -10)
frame.Parent = gui

-- Create a UISlider object to represent the slider
local slider ="UISlider")
slider.Size =, 0, 1, 0)
slider.Parent = frame

-- Add an event listener to the slider to update the Part1's TopParamB value whenever the slider's value changes
    part.TopParamB = newValue

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.