So i am making a script that changes a value after something been selected. I need the value because im gonna use it in another script. I will put both scripts i got the first script is the one that changes the value. i tried int value and number value.

local qtable = {}
qtable[1] = "How do you say Apple in spanish"
qtable[2] = "In the rubiks cube wca, What shape is the megaminx"
qtable[3] = "What's Ikon's most liked song"
game.ReplicatedStorage.starting.OnClientEvent:Connect(function(player)
    local random = math.random(1, 3)
    print("Client Fired")
    wait(10)
    if random == 1 then 
        script.Parent.Text = "Platform 1, "..qtable[math.random(1,3)].."?"
        script.Parent.Platform.Value = 1
    elseif random == 2 then
        script.Parent.Text = "Platform 2, "..qtable[math.random(1,3)].."?"
        script.Parent.Platform.Value = 2
    elseif random == 3 then
        script.Parent.Text = "Platform 3, "..qtable[math.random(1,3)].."?"
        script.Parent.Platform.Value = 3
    end
end)
local plr = game:GetService("Players").LocalPlayer
local TweenService = game:GetService("TweenService")
local PlatForm = game:GetService("Workspace").DisapearPart

local tweeningInformation = TweenInfo.new(
    7,   
    Enum.EasingStyle.Quart,
    Enum.EasingDirection.InOut,
    0,
    false,
    0
)

local Move = {CFrame = CFrame.new(99.125, 177.707, -262.83)}
local ComeBack = {CFrame = CFrame.new(99.125, 177.707, -215.915)}
local tween1move = TweenService:Create(PlatForm,tweeningInformation,Move)
local tween1comeback = TweenService:Create(PlatForm,tweeningInformation,ComeBack)


game.Players.PlayerAdded:Connect(function(player)
    player.Chatted:Connect(function(message)
        if message:lower() == "ready" then
			game.ReplicatedStorage.starting:FireClient(player)
			tween1move:Play()
   			wait(70)
   			tween1comeback:Play()
		else
		print("Unknown")
		
        end
    end)
end)

2 comments

0

Which value?

0

im using a number value rn but you can see what im doing at line 11 its a local script