Hi!
I’m creating a game, where ProximityPrompts HoldDuration time is constantly being modified by the client. The ProximityPrompts are tagged, so the client knows which prompts hold duration to edit.
So, my problem is that, when player spawns outside the main game area, the tags are not replicated, because the objects with these tags are not loaded on the client side. I would not want to disable StreamingEnabled option, so is there any other way to go about it?
Here’s a code snippet that I use to get all tags, I was also wondering if there’s a more “dynamic” way of doing it, but couldn’t figure a way. I think there may be a easy solution that I may be missing.
local TrashCan = Collection:GetTagged("TrashCan")
local Dumpster = Collection:GetTagged("Dumpster")
local function SetHoldTime(Tag, Time)
local AllStuffFromTag = Collection:GetTagged(Tag)
for i,v in ipairs(AllStuffFromTag) do
v.HoldDuration = Time
end
end
--start setting
local TrashCanSpeed = DefaultWaitTime/TrashDivingSpeed.Value
SetHoldTime("TrashCan", TrashCanSpeed)
local DumpsterSpeed = DefaultWaitTime + 3/TrashDivingSpeed.Value
SetHoldTime("Dumpster", DumpsterSpeed)