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

Difference from Run and Play?

Asked by 3 years ago

I've been trying to make a camera scriptable in game but it wont do it if i push play but if I use Run it works.

Here's my script


local Dice = script.Parent local Cam = workspace.CurrentCamera local Object = game.Workspace.Part Object.CanCollide = false Object.Anchored = true wait(1) repeat wait() game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable until game.Workspace.CurrentCamera.CameraType == Enum.CameraType.Scriptable Cam.CFrame = workspace.CamPart.CFrame Object.Orientation = Vector3.new(0, 0, 90) Dice.Orientation = Vector3.new(math.random(0, 360), math.random(0, 360), math.random(0, 360)) wait(5) Dice.Anchored = false wait(10) Dice.Anchored = true wait(0.1) Object.Position = workspace.Union.Position wait(0.1) Cam.CFrame = CFrame.new(Dice.Position + Vector3.new(0,30,0), Dice.Position) -- changes the position of camera above the dice wait(5) -- You can change it to however long you want it to hover Cam.CameraType = Enum.CameraType.Custom -- Changes the camera back to player
0
"Play" adds a client to the test-server (your player, character, etc.), whereas "Run" runs server-side code (doesn't join a client to the local test-server). appxritixn 2235 — 3y
0
Is this in a server script or a local script? radiant_Light203 1166 — 3y
0
its jusst a normal script under a object Mittens0924 4 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

If you click run, your character won't be there, if you click play, your character will be there meaning it's like you're playing a roblox game while play is just like you're a camera walking around and test things

Ad

Answer this question