I wanted to create a clock and change the hour “stick” to the position i gave in the table but it just gives me an error instead
Here’s the code for it
local screenColorModule = require(game.ReplicatedStorage.ColorCorrectionSettings)
local possibleHourPositions = {
["1st"] = {
Position = -69.618, 8.446, 0.064,
Orientation = -28.17, 180, 0
},
["2nd"] = {
Position = -69.618, 7.827, 0.774,
Orientation = -58.805, 180, 0
},
["3rd"] = {
Position = -69.618, 6.726, 1.153,
Orientation = 90, 0, 0
},
["4rd"] = {
Position = -69.618, 7.796, -3.019,
Orientation = -59.203, 0, 0
},
["5rd"] = {
Position = -69.618, 5.617, -3.173,
Orientation = -61.884, 180, 180
},
["6rd"] = {
Position = -69.618, 4.527, -1.126,
Orientation = 0, 0, 180
},
["TheEnd"] = {
Position = -69.618, 9.127, -1.126,
Orientation = 0,0,0
}
}
script.Parent.hour.ClickDetector.MouseClick:Connect(function()
local random = math.random(1,#possibleHourPositions) --where it happens
for i,v in pairs(possibleHourPositions) do
if random == i and i ~= "TheEnd" then
script.Parent.hour.Position = Vector3.new(v.Position)
script.Parent.hour.Orientation = Vector3.new(v.Orientation)
else
script.Parent.hour.Position = Vector3.new(v.Position)
script.Parent.hour.Orientation = Vector3.new(v.Orientation)
script.Parent.ding:Play()
screenColorModule.ScreenColor(game.Lighting.MeteorEffect,Color3.new(1, 1, 1),3,0)
end
end
end)
(I know its not really a clock but it would really help if you find the solution to this mess)