i asked this a few times but never had a good answer ima i made 3 scripts that have the same code but changes because they do the samething on 3 blocks. the 3 scripts dont work. there are no errors but the block dont move
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)
wait(11)
if game.ReplicatedStorage.Platform.Value == 1 then
tween1move:Play()
wait(300)
tween1comeback:Play()
end
end)
the script that fires the event
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)
i was also told to move the script in to my server script which i dont know how to do so if that works please do it
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(300)
tween1comeback:Play()
else
print("Unknown")
end
end)
end)
