Ok so I think new places might be bugged, either that or I’ve once again somehow managed to get something weird to happen with no real explanation, just like:
Notice specifically the teleporting and transparency changes, while not shown in the clip accessories can also be temporarily made invisible too as well as the player can sometimes fall over until their invisible limb becomes visible again.
I have 0 clue how this started and how to fix it, there is no script to teleport the player, make them fall over, possibly change transparency of them / remove a hat temporarily. There isn’t a virus in the place since if there was I would have noticed, especially since I haven’t used any free models in it.
I tried porting all of this over to a couple different places too and the problem persisted.
That’s the code that is inside the script inside of the part that is touched, which has no references to the HumanoidRootPart nor any of the player’s limbs, accessories or anything.
Shard = script.Parent
Later on with the
Shard.Transparency = 1
And you checked if the shard’s parent have a child named humanoid.
Which I guess only works since its actually one of the part of a player.
Literally nothing make sense in your script after
local function OnTouch(Shard)
Don’t use debounce for stuff that only happens once or things that turn itself to the opposite state. In this case, use event:Wait() instead of connecting it.
elseif statements are not a requirement. If you do not plan on doing anything other then
if do not add them.
not bool is cleaner than
bool == false. Unless the
bool variable can be anything outside of booleans, use them instead.
I’m not sure how the HumanoidRootPart gains a transparency of 0 ( despite there being nothing in the script which changes it to 0 ) and how the player teleports despite the shard being very clearly shown to be the parent of the script.
And I’m not sure how you expect a script involving touching to NOT use a debounce considering if it didn’t it would constantly repeat the exact same function over and over again every frame you are touching it.
I’m pretty sure the Elseif does nothing really, I just keep them in for the sake of it.
I’m also fairly sure that in this context a not bool would have no real difference compared to a bool in terms of debounces.
HumanoidRootPart is one of the “shard” parts that touch the object. You turn it’s transparency to 0 after
Ok after reevaluating my script I was just making a dumb mistake here. I can indeed confirm that I am stupid.