Forcing a value to be an Instance

How was I supposed to write:

local Hum = workspace.Humanoid
hum: Humanoid -- clearly this isn't written right

How did I write this again?

I’m very confused on what you’re trying to do

TypeChecking?

local Hum : Humanoid = workspace.Humanoid
print(Hum)

Yeah, that’s what I am trying to do. But it errors?

What is the error message in output?

Nothing really, it’s just a syntax error.

pretty sure you can do

type particle = ParticleEmitter

to redefine the type checking type.

Oh yeah. But what about the : way?

Thats just when you’re setting variables

local part : Part = workspace.Part

and long method

local part = workspace.Part
type part = Part

Pretty sad. But that’s just how Programming Languages work. Anyhow, thanks.

1 Like