ERROR with my Pulse Trigger Code - New to coding

Im new to coding and Verse and i have a bug on my code and i don`t know how to fix it because no information is on the internet about the pulse trigger device using Verse.

The code consists of choosing a random Intensity/Var and changing it to a WaveSpeed

Code w/error :

using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
using { /Verse.org/Random }

l
IntensityLevelPulseTrigger := class(creative_device):

@editable
TriggerActivated : trigger_device = trigger_device{}


@editable
Pulse_Device : pulse_trigger_device = pulse_trigger_device{}

var Intensity : int = 0

var IntensityFloat : float = 0.0

var WaveSpeed : float = 0.0




OnBegin<override>()<suspends>:void=
    TriggerActivated.TriggeredEvent.Subscribe(OnTriggerActivated)



OnTriggerActivated(MaybeAgent:?agent):void=
    if(Agent:agent=MaybeAgent?):
            
            
         set Intensity = GetRandomInt(30,50)
         GetWaveSpeed:float = WaveSpeed
         Print ("{WaveSpeed}")
        
         SetWaveSpeed(Intensity:Int):void = Pulse_Device
            Print ("{WaveSpeed}")

i`l really appreciate if someone can fix this code so that i can learn from my mistake

I don’t understand what you’re trying to do, looking at the Verse API, it seems that you can only change the wave speed of the device, using pulse_trigger_device.SetWaveSpeed(:float) but you’re not calling this and you’re not even changing the WaveSpeed variable here, when you change it you assign it to WaveSpeed again which doesn’t do much