Teleport Skript

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Hey! I've been trying to find a way to teleport a player on right click of npc, yes I use citizens but for some reason CitizensCMD is not working.

The npc name is 'coolkidarya', and it needs to teleport to -870 80 562.

Sneak peak:

CRJmxk7z5xnQ


Current code:

on script load:
set {blockmine.location} to "-870, 80, 562"

on rightclick on entity:
if name of entity is "coolkidarya":
teleport player to {blockmine.location}

Any help appriciated!

- TheCringleYT
 
Hey! I've been trying to find a way to teleport a player on right click of npc, yes I use citizens but for some reason CitizensCMD is not working.

The npc name is 'coolkidarya', and it needs to teleport to -870 80 562.

Sneak peak:

CRJmxk7z5xnQ


Current code:

on script load:
set {blockmine.location} to "-870, 80, 562"

on rightclick on entity:
if name of entity is "coolkidarya":
teleport player to {blockmine.location}

Any help appriciated!

- TheCringleYT
you need to use the expression location at
Code:
set {_loc} to the location at arg-1, arg-2, arg-3 of the world arg-4
Try using this
Code:
On load:
    set {blockmine.location} to the location at -870, 80, 562 of the world WorldNameHere
 
Okay! I'll try this and get back to you ASAP.

Thanks,

- TheCringleYT
[doublepost=1598945749,1598887022][/doublepost]Thanks, but it says this error:

Can't understand this expression: ("the location at -870', '80' and '562 of the world ul_TestingSpawn') (teleport.sk line 2: set {blockmine.location} to the location at -870, 80, 562 of the world ul_TestingSpawn')



Please help me.

Thanks,

- TheCringleYT
[doublepost=1599028913][/doublepost]Please can someone help?
 

Attachments

  • Screenshot 2020-09-01 at 08.34.56.png
    Screenshot 2020-09-01 at 08.34.56.png
    64.1 KB · Views: 166
Okay! I'll try this and get back to you ASAP.

Thanks,

- TheCringleYT
[doublepost=1598945749,1598887022][/doublepost]Thanks, but it says this error:

Can't understand this expression: ("the location at -870', '80' and '562 of the world ul_TestingSpawn') (teleport.sk line 2: set {blockmine.location} to the location at -870, 80, 562 of the world ul_TestingSpawn')



Please help me.

Thanks,

- TheCringleYT
[doublepost=1599028913][/doublepost]Please can someone help?
Are you sure the world ul_TestingSpawn exists?
Try replacing ul_TestingSpawn with "ul_TestingSpawn" or world or removing of the world ul_TestingSpawn entirely.
 
Last edited:
Status
Not open for further replies.