So I was making a game about Ice scream 1 and I noticed a bug in my code it wouldnt let me teleport to the map so I need a Ontouch script or a gui that appears when clicked then I need a circus pic I can get from google and you have to press it to teleport heres the code:
local service = game:GetService("TeleportService") local place = 1456361270 ---Map Ice Scream
service:Teleport(place,plr);
Just a friendly reminder, that the TeleportService
doesn't work in studio for reasons.
Also, try using the little blue button on your editing view to add in LUA
code.
The thing is, FilteringEnabled
forces people to use RemoteEvents
and RemoteFunctions
. If you don't know what they are, click this: developer.roblox.com/en-us/api-reference/class/RemoteEvent
You can use a touch function to fire a RemoteEvent
, and have a LocalScript
ready to listen for the RemoteEvent
. Take example:
Server Script
local Part = script.Parent Part.Touched:Connect(function(hit) if hit.Parent:FindFirstChild('Humanoid') then local player = game.Players[hit.Parent] game.ReplicatedStorage.RemoteEvent:FireClient(player) end end)
Local Script
game.ReplicatedStorage.RemoteEvent.OnClientEvent:Connect(function() print("Your code here!") end)
Try using this to help with your situation. Feel free to ask me in the comments if I made a typo, if you don't understand anything etc.
Hope I helped! ;)
I dont understand how scripts work im new to scripting