Jump to content

EVENT BLOCK LOCATION SKRIPT NOT WORKING


Hello123456

Recommended Posts

Ok this is THE LAST time i am making a forum on this skript. 

I just want to teleport the player when the hit a gold block on a certain location. I have two variants that I tested, both reload successfully, but none of them work.

on walk on gold block:
    if location of event-block is location(15, 4, 63, world "ul_ColoMiners"):
        teleport the player to location(15, 4, 50, world "ul_ColoMiners")

on walk on gold block:
    if event-block's location is location(15, 4, 63 world "ul_ColoMiners"):
        teleport the player to location(15, 4, 50, world "ul_ColoMiners")

I CHECKED EVERYTHING, CHECKED COORDS, CHECKED WORLD, STILL DOESNT WORK. 

 

Link to comment
Share on other sites

try

on walk on gold block:
	if event-block's location = location at x, y, z in world "world":
		# stuff

and just change the location to what you want. And try making a skript that sends you the variable of the block you right click so you can see if the location of the blocks are exactly right. 

  • Like 1

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

15 hours ago, _Tarna_ said:

try


on walk on gold block:
	if event-block's location = location at x, y, z in world "world":
		# stuff

and just change the location to what you want. And try making a skript that sends you the variable of the block you right click so you can see if the location of the blocks are exactly right. 

Wait, it works but it works for all gold blocks which is not what i want. 

Link to comment
Share on other sites

1 hour ago, Hello123456 said:

Wait, it works but it works for all gold blocks which is not what i want. 

Did you do the indentation right? Cause you said it gave an error which might be an indentation error. Check if all the indentation is right. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

1 hour ago, _Tarna_ said:

Did you do the indentation right? Cause you said it gave an error which might be an indentation error. Check if all the indentation is right. 

Yeah like Tarna said, make sure you have everything formatted correctly, other than that it should work.

[VIP] - 08/29/2020

Discord - Detective Vapor#2222

Urt3GYyYLm.png

Link to comment
Share on other sites

4 hours ago, oVapor said:

Yeah like Tarna said, make sure you have everything formatted correctly, other than that it should work.

Ok I changed the skript a bit following Tarna's exact format and it gives no errors but doesnt work.

on walk on gold block:
    if event-block's location = location at 15, 4, 63 in world "ul_ColoMiners":
        teleport the player to location(15, 4, 50, world "ul_ColoMiners")

I also made sure to go onto the direct coordinates by changing it to .5 for everything (except 4) and teleport to 15.5 4 63.5. Still doesnt work.

 

Then there was this one that said numeric id's arent supported and didnt work

on walk on gold block:
    if event-block's location = location at location(15, 4, 63 in world "ul_ColoMiners"):
        teleport the player to location(15, 4, 50, world "ul_ColoMiners")

 

And this one that gives a function error:

on walk on gold block:
    if event-block's location = location(15, 4, 63 in world "ul_ColoMiners"):
        teleport the player to location(15, 4, 50, world "ul_ColoMiners")

Link to comment
Share on other sites

18 minutes ago, Hello123456 said:

And this one that gives a function error:

on walk on gold block:
    if event-block's location = location(15, 4, 63 in world "ul_ColoMiners"):
        teleport the player to location(15, 4, 50, world "ul_ColoMiners")

This gives a function error because you didn't use the function correctly. You are missing a comma. The correct usage of the function is location(x, y, z, world "world"). You didn't use it like that in the 2nd line of that. 

Try making a skript that broadcasts the location you right click so you know it is exactly right. You don't need decimals in the location. Or instead of on walk on, change it to another event just to see if the issue is that the event isn't working. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

2 hours ago, _Tarna_ said:

This gives a function error because you didn't use the function correctly. You are missing a comma. The correct usage of the function is location(x, y, z, world "world"). You didn't use it like that in the 2nd line of that. 

Try making a skript that broadcasts the location you right click so you know it is exactly right. You don't need decimals in the location. Or instead of on walk on, change it to another event just to see if the issue is that the event isn't working. 

Made this script relying on what you said, no error, doesn't work tho 😞

on step on gold block:
    if event-block's location = location(15, 4, 63, world "ul_ColoMiners"):
        teleport the player to location(15, 4, 50, world "ul_ColoMiners")

Edited by Hello123456
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...