generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Game Design
Home Search
 

Re: Click this if you're a pro scripter <-

Previous Thread :: Next Thread 
tobylee1112 is not online. tobylee1112
Joined: 17 Oct 2011
Total Posts: 401
05 Jul 2016 06:35 AM
-----------------
This script is from ROBLOX and I am trying to modify the highlighted lines
---------------------




-- ROBLOX Services

local RunService = game:GetService('RunService')

-- Game Services
local NotificationManager = require(script.NotificationManager)
local TimerManager = require(script.TimerManager)

-- Local Variables

local Events = game.ReplicatedStorage.Events
local DisplayIntermission = Events.DisplayIntermission
local SetBlurBlock = Events.SetBlurBlock
local Camera = game.Workspace.CurrentCamera
local Player = game.Players.LocalPlayer
local ScreenGui = script.ScreenGui

local InIntermission = false
local BlurBlock = nil

-- Initialization

game.StarterGui.ResetPlayerGuiOnSpawn = false
ScreenGui.Parent = Player.PlayerGui

-- Local Functions

local function StartIntermission()

-- Find flag to circle. Default to circle center of map
local possiblePoints = {}
table.insert(possiblePoints, Vector3.new(0,50,0))

for _, child in ipairs(game.Workspace:GetChildren()) do
if child.Name == "FlagStand" then
table.insert(possiblePoints, child.FlagStand.Position)
end
end

local focalPoint = possiblePoints[math.random(#possiblePoints)]
Camera.CameraType = Enum.CameraType.Scriptable
Camera.Focus = CFrame.new(focalPoint)

local angle = 0
RunService:BindToRenderStep('IntermissionRotate', Enum.RenderPriority.Camera.Value, function()
local cameraPosition = focalPoint + Vector3.new(50 * math.cos(angle), 20, 50 * math.sin(angle))
Camera.CoordinateFrame = CFrame.new(cameraPosition, focalPoint)
angle = angle + math.rad(.25)

if BlurBlock then
BlurBlock.CFrame = Camera.CoordinateFrame +
Camera.CoordinateFrame:vectorToWorldSpace(Vector3.new(0,0,-2))
end
end)
end

local function StopIntermission()
game.Workspace.Int:Stop() <----------------------------------------
RunService:UnbindFromRenderStep('IntermissionRotate')
Camera.CameraType = Enum.CameraType.Custom
end

local function OnDisplayIntermission(display)
if display and not InIntermission then
game.Workspace.Int:Play() <------------------------
InIntermission = true
StartIntermission()
end
if not display and InIntermission then
InIntermission = false

StopIntermission()
end
end

local function OnSetBlurBlock(block)
BlurBlock = block
BlurBlock.LocalTransparencyModifier = 0
end

-- Event Bindings
DisplayIntermission.OnClientEvent:connect(OnDisplayIntermission)
SetBlurBlock.OnClientEvent:connect(OnSetBlurBlock)

local BlurContainer = game.Workspace:WaitForChild('MapPurgeProof'):WaitForChild('BlurContainer')
BlurContainer.ChildAdded:connect(function(child)
if child ~= BlurBlock then
child.LocalTransparencyModifier = 1
end
end)
for _, child in ipairs(BlurContainer:GetChildren()) do
if child ~= BlurBlock then
child.LocalTransparencyModifier = 1
end
end
Report Abuse
tobylee1112 is not online. tobylee1112
Joined: 17 Oct 2011
Total Posts: 401
05 Jul 2016 06:42 AM
I am expecting for ages
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
05 Jul 2016 06:43 AM
I see a script (in the wrong forum) but i don't see a question?

What do you want us to do?
Report Abuse
tobylee1112 is not online. tobylee1112
Joined: 17 Oct 2011
Total Posts: 401
05 Jul 2016 07:00 AM
I want to let the script play music while in intermission. Please help!
Report Abuse
Azure_Kite is not online. Azure_Kite
Joined: 26 Feb 2016
Total Posts: 612
05 Jul 2016 07:14 AM
Do you have a sound called "Int" in workspace, Complete with the sound id?

and does the script gives any error?
Report Abuse
tobylee1112 is not online. tobylee1112
Joined: 17 Oct 2011
Total Posts: 401
05 Jul 2016 07:16 AM
wait I forgot to insert the ID
LOL!!!
Report Abuse
PRESTIGIOUSaLEGEND is not online. PRESTIGIOUSaLEGEND
Joined: 16 Apr 2011
Total Posts: 1765
05 Jul 2016 07:17 AM
What a nab
Report Abuse
Azure_Kite is not online. Azure_Kite
Joined: 26 Feb 2016
Total Posts: 612
05 Jul 2016 07:17 AM
https://i.gyazo.com/d3c1d5e442f5dbffe1ffc0202a5f9c83.png
Report Abuse
tobylee1112 is not online. tobylee1112
Joined: 17 Oct 2011
Total Posts: 401
05 Jul 2016 07:34 AM
whoops. now the audio cannot stop after intermission
Report Abuse
tobylee1112 is not online. tobylee1112
Joined: 17 Oct 2011
Total Posts: 401
05 Jul 2016 07:35 AM
Found the error thx
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image