Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

hi how any ideas to make this script better?

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!

cacalol

New Member
Reputation: 0 / 0 / 0
Sep 2, 2021
25
1
3
Roblox
easyreooo
Lua:
local DirectionAccepted = {
    [0] = true,
    [1] = true,
    [2] = true
}
local _Direction = {
    [0] = Vector3.new(0,360,0),
    [1] = Vector3.new(360,0,0),
    [2] = Vector3.new(0,0,360)
}
local TweenService = game:GetService("TweenService")

local Spinner = script.SpinnerLocation.Value
local Speed = 0
local Direction = 0
if Spinner:FindFirstChild("_SpinnerSpeed") then
    Speed = Spinner._SpinnerSpeed.Value
end
if Spinner:FindFirstChild("_SpinnerDirection") and DirectionAccepted[Spinner._SpinnerDirection.Value] == true then
    Direction = Spinner._SpinnerDirection.Value
end
local _MoveDirection = _Direction[Direction]
local _TweenInfo = TweenInfo.new(Speed,Enum.EasingStyle.Linear)
while true do
    for i,SpinnerObj in pairs(Spinner:GetChildren()) do
        --Accept Part, MeshPart and Union only
        if SpinnerObj.ClassName == "Part" or SpinnerObj.ClassName == "MeshPart" or SpinnerObj.ClassName == "UnionOperation" then
            TweenService:Create(SpinnerObj,_TweenInfo,{Orientation = SpinnerObj.Orientation + _MoveDirection}):Play()
        end
    end
    wait(Speed)
end
v


and also.


Lua:
local DirectionAccepted = {
    [0] = true,
    [1] = true,
    [2] = true
}
local _Direction = {
    [0] = Vector3.new(0,360,0),
    [1] = Vector3.new(360,0,0),
    [2] = Vector3.new(0,0,360)
}
local TweenService = game:GetService("TweenService")

local Spinner = script.SpinnerLocation.Value
local Speed = 0
local Direction = 0
local SpinnerRounds = 1 --Rounds before spinner stop
local SpinnerDelay = 1 --Seconds
if Spinner:FindFirstChild("_Rounds") and Spinner:FindFirstChild("_Rounds").Value > 0 then --Spinner rounds cannot be negative or 0
    SpinnerRounds = Spinner._Rounds.Value
end
if Spinner:FindFirstChild("_Delay") and Spinner:FindFirstChild("_Delay").Value > 0 then --Spinner with delay 0 is a normal spinner
    SpinnerDelay = Spinner._Delay.Value
end
if Spinner:FindFirstChild("_SpinnerSpeed") then
    Speed = Spinner._SpinnerSpeed.Value
end
if Spinner:FindFirstChild("_SpinnerDirection") and DirectionAccepted[Spinner._SpinnerDirection.Value] == true then
    Direction = Spinner._SpinnerDirection.Value
end
local _MoveDirection = _Direction[Direction]
local _TweenInfo = TweenInfo.new(Speed,Enum.EasingStyle.Linear)
while true do
    for i = 1,SpinnerRounds do
    for i,SpinnerObj in pairs(Spinner:GetChildren()) do
        --Accept Part, MeshPart and Union only
        if SpinnerObj.ClassName == "Part" or SpinnerObj.ClassName == "MeshPart" or SpinnerObj.ClassName == "UnionOperation" then
            TweenService:Create(SpinnerObj,_TweenInfo,{Orientation = SpinnerObj.Orientation + _MoveDirection}):Play()
        end
    end
        wait(Speed)
    end
    wait(SpinnerDelay)
end
Post automatically merged:

and
Lua:
local SpinnerLocation = workspace.SpinnerLocations.Spinner.Value
local ObjClientScripts = Instance.new("Folder",game.Players.LocalPlayer.PlayerScripts)
ObjClientScripts.Name = "ObjClientScripts"
for i,Spinner in pairs(SpinnerLocation:GetChildren()) do
    if Spinner:FindFirstChild("isAspinner") then
        local _Script = game.ReplicatedFirst._ClientSpinnerControl:Clone()
        _Script.Parent = ObjClientScripts
        _Script.SpinnerLocation.Value = Spinner
        _Script.Disabled = false
    end
end
 
Last edited:

cacalol

New Member
Reputation: 0 / 0 / 0
Sep 2, 2021
25
1
3
Roblox
easyreooo
yeah i know
Post automatically merged:

no one will slove this
Post automatically merged:

yep
 
Last edited:
  • Meh
Reactions: trains