Does CollectionService work on the client too?
I created a script in StarterPlayerScripts:
local collectionService: CollectionService = game:GetService("CollectionService")
local runService: RunService = game:GetService("RunService")
for i, v in collectionService:GetTagged("Gloves") do
local gloves: Model = v
local function updatePivot()
while true do
for i = 1, 50 do
gloves:PivotTo(gloves:GetPivot() * CFrame.Angles(0, math.rad(1), 0) + Vector3.new(0, 0.01, 0))
runService.RenderStepped:Wait()
end
for i = 1, 50 do
gloves:PivotTo(gloves:GetPivot() * CFrame.Angles(0, math.rad(1), 0) - Vector3.new(0, 0.01, 0))
runService.RenderStepped:Wait()
end
end
end
local pivotCoroutine = coroutine.create(updatePivot)
coroutine.resume(pivotCoroutine)
end
Is this how’d I go about doing this?