Skip to content

Commit 088e086

Browse files
committed
feat: add back UpdateFunction event type
closes #46
1 parent 2bccbb8 commit 088e086

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎src/handler/EVHEvent/loader/init.server.luau‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,5 +653,17 @@ script.Parent.OnServerEvent:Connect(function(player: Player, type: string, ...)
653653
end
654654
end
655655
end
656+
elseif type == "UpdateFunction" then
657+
local functionName: string, pattern: number = ...
658+
if functionName == nil or pattern == nil or typeof(pattern) ~= "number" then
659+
return
660+
end
661+
-- This is to prevent setting other attributes that may not be EVC related
662+
for _, currentFunction in functions do
663+
if currentFunction.name == functionName then
664+
car:SetAttribute(currentFunction.name, pattern)
665+
break
666+
end
667+
end
656668
end
657669
end)

0 commit comments

Comments
 (0)