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

Can somebody help me here? I have a problem with viewportframes

Asked by 5 years ago
Edited 5 years ago

I'm making a script where you can see yourself and hidden passages through ROBLOX, essentially an illusion game.

Problem:

me=script.Parent.Parent.Parent.Parent.Character:Clone()
while wait(0.2) do
script.Parent.CurrentCamera = workspace.CurrentCamera
me.Parent = script.Parent
wait()
end

It then ends up with:

22:30:18.473 - Players.kolbyplaysroblox123.PlayerGui.ScreenGui.ViewportFrame.LocalScript:4: attempt to index global 'me' (a nil value)
22:30:18.474 - Stack Begin
22:30:18.475 - Script 'Players.kolbyplaysroblox123.PlayerGui.ScreenGui.ViewportFrame.LocalScript', Line 4
22:30:18.475 - Stack End

If you can help i'll give a shout-out if i make a game out of it.

0
Please? kolbyplaysroblox123 0 — 5y
0
Post the entire script The_Pr0fessor 595 — 5y
0
Done. kolbyplaysroblox123 0 — 5y
0
If this is inside a GUI, I'd suggest you change the value of "me" to game.Players.LocalPlayer.Character:Clone(). Also, if this is in a normal script, use LocalScript. Y_VRN 246 — 5y
0
This IS inside of a GUI, but if it's local or not, it gives me the nil value anyway. kolbyplaysroblox123 0 — 5y

Answer this question