Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Choosing an object in lighting with math.random?

Asked by
Oullim 0
8 years ago

Cant exactly figure out Choosing an object in lighting with math.random can anyone help? This is the code i have

module3D = require(script.Parent.Module3D)
frame = script.Parent.Frame
p = game.Players:GetChildren()
guy = p[math.random(1,#p)]
model3D = module3D:Attach3D(frame,guy)
model3D:SetActive(true)

game:GetService("RunService").RenderStepped:connect(function ()
    local fullRotation = math.pi*2
    local currentRotation = tick()%fullRotation
    model3D:SetCFrame(CFrame.Angles(0,currentRotation,0))
end)

It uses Module3D if you hadn't noticed...

0
GetChildren(), not Children() TheDeadlyPanther 2460 — 8y
0
works the same, tbh ImageLabel 1541 — 8y

Answer this question