Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Click Teleport Won't Work In Online Game, How Do i Fix It?

Asked by 9 years ago

This is how the script Looks like:

function onClicked()
wait(1)
local c = game.Players:GetChildren() 
for i = 1, #c do 
c[i].Character.Torso.CFrame = CFrame.new(game.Workspace.Locker1Teleporter.GG.Position)
end 

end 

game.Workspace.Locker1Teleporter.TeleportG.ClickDetector.MouseClick:connect(onClicked)

I HAVE TRIED: -- "parent.parent" method ect and it did not work. -- F9 on Online, Console said NOTHING :o -- Changing the "Parent" into a longer version, as seen above.

Here is how it originaly looked like:

function onClicked()
wait(1)
local c = game.Players:GetChildren() 
for i = 1, #c do 
c[i].Character.Torso.CFrame = CFrame.new(script.Parent.Parent.GG.Position)
end 

end 

script.Parent.TeleportG.ClickDetector.MouseClick:connect(onClicked)

What i have made is so that if you click on the "Locker" as ive created you will be teleported "Inside" of it, it worked in "Play Solo" but NOT in Server.

Here is the game: http://www.roblox.com/Escape-place?id=184349084

So, any tips or fixes? The answear might be easy visible but im kindoff new to Scripting. (Allso im new to the ScriptHelper Community) ~ THANKS ~

1 answer

Log in to vote
1
Answered by
xAtom_ik 574 Moderation Voter
9 years ago

Strange, for me the second one worked in an online game...

If you spawned in the room with the lockers then the reason was the range is too much and its not activating

0
Nope, ive tryed the MaxActivationDistance from 10 -> 60, still wont work. BLODSWIPER 15 — 9y
0
Just to mention, this script runs in a Normal Basic Script INSIDE of a Model. The Model Has the objects that you click and to the brick you will be teleported to. Again, Works Solo Test, But not in Online Server... BLODSWIPER 15 — 9y
0
Allso remember that this game uses a 2D camera type of view, So i need to keep the click distance in view of the camera placement. BLODSWIPER 15 — 9y
0
I Fixed It, Had To Have It In A Local Script. BLODSWIPER 15 — 9y
Ad

Answer this question