so i have 3 scripts that are the same thing and they work but the block wont move. can someone help?
local plr = game:GetService("Players").LocalPlayer local TweenService = game:GetService("TweenService") local plat1 = game:GetService("Workspace").Moving.plat1 local tweeningInformation = TweenInfo.new( 7, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0 ) local Move1 = {CFrame = CFrame.new(100.268, 182.064, -185.972)} local ComeBack1 = {CFrame = CFrame.new(100.268, 182.064, -199.157)} local tween1move = TweenService:Create(plat1,tweeningInformation,Move1) local tween1comeback = TweenService:Create(plat1,tweeningInformation,ComeBack1) game.ReplicatedStorage.Plat.OnServerEvent:Connect(function(player) print("Started") wait(11) if game.ReplicatedStorage.Platform.Value == 1 then tween1move:Play() wait(300) tween1comeback:Play() end end)
SCRIPT THAT CHANGES 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" local storage = game.ReplicatedStorage game.ReplicatedStorage.starting.OnClientEvent:Connect(function(player) local random = math.random(1, 3) print("Client Fired") storage.Plat:FireServer() wait(10) if random == 1 then script.Parent.Text = "Platform 1, "..qtable[math.random(1,3)].."?" storage.Platform.Value = 1 elseif random == 2 then script.Parent.Text = "Platform 2, "..qtable[math.random(1,3)].."?" storage.Platform.Value = 2 elseif random == 3 then script.Parent.Text = "Platform 3, "..qtable[math.random(1,3)].."?" storage.Platform.Value = 3 end end)
SCRIPT that are like the first one but minor changes
local plr = game:GetService("Players").LocalPlayer local TweenService = game:GetService("TweenService") local plat2 = game:GetService("Workspace").Moving.plat2 local tweeningInformation = TweenInfo.new( 7, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0 ) local Move2 = {CFrame = CFrame.new(86.359, 182.064, -186.982)} local ComeBack2 = {CFrame = CFrame.new(86.359, 182.064, -199.157)} local tween2move = TweenService:Create(plat2,tweeningInformation,Move2) local tween2comeback = TweenService:Create(plat2,tweeningInformation,ComeBack2) game.ReplicatedStorage.Plat.OnServerEvent:Connect(function(player) print("Started") wait(11) if game.ReplicatedStorage.Platform.Value == 2 then tween2move:Play() wait(300) tween2comeback:Play() end end)
local plr = game:GetService("Players").LocalPlayer local TweenService = game:GetService("TweenService") local plat3 = game:GetService("Workspace").Moving.plat3 local tweeningInformation = TweenInfo.new( 7, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false, 0 ) local Move3 = {CFrame = CFrame.new(72.223, 182.064, -186.43)} local ComeBack3 = {CFrame = CFrame.new(72.223, 182.064, -199.157)} local tween3move = TweenService:Create(plat3,tweeningInformation,Move3) local tween3comeback = TweenService:Create(plat3,tweeningInformation,ComeBack3) game.ReplicatedStorage.Plat.OnServerEvent:Connect(function(player) print("Started") wait(11) if game.ReplicatedStorage.Platform.Value == 3 then tween3move:Play() wait(300) tween3comeback:Play() end end)
In "SCRIPT THAT CHANGES VALUE",
it fires the remote event before it changes the value.
move it to the bottom of the script like this:
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" local storage = game.ReplicatedStorage game.ReplicatedStorage.starting.OnClientEvent:Connect(function(player) local random = math.random(1, 3) print("Client Fired") wait(10) --delete this if you want if random == 1 then script.Parent.Text = "Platform 1, "..qtable[math.random(1,3)].."?" storage.Platform.Value = 1 elseif random == 2 then script.Parent.Text = "Platform 2, "..qtable[math.random(1,3)].."?" storage.Platform.Value = 2 elseif random == 3 then script.Parent.Text = "Platform 3, "..qtable[math.random(1,3)].."?" storage.Platform.Value = 3 end storage.Plat:FireServer() end)
EDIT! if you are not doing experimental mode, then move setting the storage.Platform.Value to server side. this won't work in normal games.