#The "Active" property takes a long time to enable for LinearVelocity

1 messages · Page 1 of 1 (latest)

teal island
#

local button = script.Parent
local vel = Instance.new("LinearVelocity")
local e = game.Workspace.Elevator.Union
vel.Parent = e
vel.Attachment0 = e.Attachment
vel.ForceLimitsEnabled = false
vel.Enabled = false

local function buttonPressed()

vel.Enabled = true
print("go")
task.wait(1)
vel.VectorVelocity = Vector3.new(0,10,0)
e.Anchored = false

end

button.Activated:Connect(buttonPressed)

When I click the button in game, in prints go but nothing happens. I checked to see if the linearvelocity was enabled and it was. The one thing that wasn't enabled was the "Active" property. I waited a minute or two then the active property enabled and everything worked as it should. How can I make it so that the active property enables on time?

#

The active property is read-only so I can't just enable it in the script.

worldly lodge
#

Can you confirm that the Attachment0 property is setting to e.Attachment in your properties tab for both the client and the server? You may be running into an issue with the client-server boundary unless your elevator has been given network ownership to the client that is using this script. It may be worth setting up a RemoteEvent to see if it fixes your issue!

teal island
teal island
torn brambleBOT
#

studio** You are now Level 1! **studio