04-12-2021, 11:33 PM
(04-12-2021, 11:30 PM)_XxFedexX_ Wrote:(04-12-2021, 09:07 PM)NiLSPACE Wrote: You can do it with this code:
local blocktype = world:GetBlock(player:GetPosition():addedY(-1));
I get error attempt to index local 'PlayerWorld' (a nil value)
with this code:
33 function testBlock(aPlayer, OldPosition, NewPosition)
34 local PlayerWorld = OldPosition.world -- I get error here
35 local block = PlayerWorld:GetBlock(aPlayer:GetPosition():addedY(-1))[/font]
[color=#d4d4d436 end[/font][/size][/color]
And thank you for your support!
The Position object doesn't know it's world. it's only three values.
You need to ask the player object for it's world
34 local PlayerWorld = Player:GetWorld()