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 » Scripters
Home Search
 

Re: Will pay someone to fix something.

Previous Thread :: Next Thread 
Cartoonfive is not online. Cartoonfive
Joined: 02 Nov 2015
Total Posts: 2105
12 Mar 2016 07:36 AM
Heres the rundown.

I have a local script that basically, when you click n on the keyboard, it activates a "mode" for a few seconds on my game that is basically going to let you see special things. Heres the script:

local data = game.Workspace.data
local mouse = game.Players.LocalPlayer:GetMouse()
player = script.Parent.Parent.Character:FindFirstChild("Humanoid")

cooldown = false

function vision()
if cooldown == false then
cooldown = true
script.activate:Play()
script.beat:Play()
script.Parent.pulse.Disabled = false
script.Parent.static.fuzz.ImageTransparency = 0
player.WalkSpeed = 20
wait(0.1)
game.Lighting.Ambient = Color3.new(1,1,1)
game.Lighting.Brightness = 5
wait(0.05)
game.Lighting.Ambient = Color3.new(0.8,1,0.8)
game.Lighting.Brightness = 4
wait(0.05)
game.Lighting.Ambient = Color3.new(0.6,1,0.6)
game.Lighting.Brightness = 3
wait(0.05)
game.Lighting.Ambient = Color3.new(0.4,1,0.4)
game.Lighting.Brightness = 2
wait(0.05)
game.Lighting.Ambient = Color3.new(0.2,1,0.2)
game.Lighting.Brightness = 1
wait(0.05)
game.Lighting.Ambient = Color3.new(0,1,0)
game.Lighting.Brightness = 0
data.infinite.Value = true
data.visionuses.Value = data.visionuses.Value + 1
wait(10)
script.beat:Stop()
game.Lighting.Ambient = Color3.new(0,0,0)
data.infinite.Value = false
script.Parent.pulse.Disabled = true
player.WalkSpeed = 16
script.Parent.static.fuzz.ImageTransparency = 0.7
wait(5)
cooldown = false
end


end
mouse.KeyDown:connect(function(pressed)
pressed = pressed:lower()
if pressed == "n" then
vision()
end
end)




Absolutely NO errors are printed when i do this in studio. However, when i actually play the game from the website on roblox player (NOT Play on ROBLOX Studio), this script will not work. Even more interesting, i tried enabling FilteringEnabled, and in Studio and in game, it worked, but stopped working before the ambient change. I tried removing the ambient effect and it still didnt work in game, so its not the ambient. I can show you all the stuff that this script edits, but i just dont know. This is an essential feature to my game and i NEED to get it fixed. plox
Report Abuse
seanbenish is not online. seanbenish
Joined: 31 Jul 2009
Total Posts: 429
12 Mar 2016 07:54 AM
Try this: (it should work, reply if there is an issue)

local actionser = game:GetService("ContextActionService")
local data = game.Workspace.data
local mouse = game.Players.LocalPlayer:GetMouse()
player = script.Parent.Parent.Character:WaitForChild("Humanoid")

cooldown = false

function vision()
if cooldown == false then
cooldown = true
script.activate:Play()
script.beat:Play()
script.Parent.pulse.Disabled = false
script.Parent.static.fuzz.ImageTransparency = 0
player.WalkSpeed = 20
wait(0.1)
game.Lighting.Ambient = Color3.new(1,1,1)
game.Lighting.Brightness = 5
wait(0.05)
game.Lighting.Ambient = Color3.new(0.8,1,0.8)
game.Lighting.Brightness = 4
wait(0.05)
game.Lighting.Ambient = Color3.new(0.6,1,0.6)
game.Lighting.Brightness = 3
wait(0.05)
game.Lighting.Ambient = Color3.new(0.4,1,0.4)
game.Lighting.Brightness = 2
wait(0.05)
game.Lighting.Ambient = Color3.new(0.2,1,0.2)
game.Lighting.Brightness = 1
wait(0.05)
game.Lighting.Ambient = Color3.new(0,1,0)
game.Lighting.Brightness = 0
data.infinite.Value = true
data.visionuses.Value = data.visionuses.Value + 1
wait(10)
script.beat:Stop()
game.Lighting.Ambient = Color3.new(0,0,0)
data.infinite.Value = false
script.Parent.pulse.Disabled = true
player.WalkSpeed = 16
script.Parent.static.fuzz.ImageTransparency = 0.7
wait(5)
cooldown = false
end


end
actionser:BindAction("vision",vision,false,Enum.KeyCode.N)


public static void main(String[] args) { System.out.println("Oops! Wrong language."); }
Report Abuse
HumanXerxes is not online. HumanXerxes
Joined: 17 Apr 2011
Total Posts: 1351
12 Mar 2016 08:00 AM
A few things you should also do:

Disable Filtering for now. You'll eventually need to make your script work with Filtering since its a great feature for any game, but for now it will just cause problems.

This isn't the problem, but you can change these lines:

game.Lighting.Ambient = Color3.new(1,1,1)
game.Lighting.Brightness = 5
wait(0.05)
game.Lighting.Ambient = Color3.new(0.8,1,0.8)
game.Lighting.Brightness = 4
wait(0.05)
game.Lighting.Ambient = Color3.new(0.6,1,0.6)
game.Lighting.Brightness = 3
wait(0.05)
game.Lighting.Ambient = Color3.new(0.4,1,0.4)
game.Lighting.Brightness = 2
wait(0.05)
game.Lighting.Ambient = Color3.new(0.2,1,0.2)
game.Lighting.Brightness = 1
wait(0.05)
game.Lighting.Ambient = Color3.new(0,1,0)
game.Lighting.Brightness = 0

Into:

for i=5,0,-1 do
game.Lighting.Ambient = Color3.new(i/5,1,i/5)
game.Lighting.Brightness = i
wait(.05)
end
Report Abuse
Cartoonfive is not online. Cartoonfive
Joined: 02 Nov 2015
Total Posts: 2105
12 Mar 2016 08:00 AM
Sorry for late reply, started working on something. xdd

Put it in a localscript and it printed this error:

09:00:28.914 - Activate is not a valid member of LocalScript
09:00:28.914 - Script 'Players.Player.PlayerGui.LocalScript', Line 11
09:00:28.914 - Stack End
09:00:28.914 - ContextActionService: Unexpected error while invoking callback: Activate is not a valid member of LocalScript
Report Abuse
Cartoonfive is not online. Cartoonfive
Joined: 02 Nov 2015
Total Posts: 2105
12 Mar 2016 08:01 AM
Human, doesnt FE limit/change what you can script?
Report Abuse
HumanXerxes is not online. HumanXerxes
Joined: 17 Apr 2011
Total Posts: 1351
12 Mar 2016 08:03 AM
Did you change the name of the sound called "activate"? That error means the script didn't find "script.activate"
Report Abuse
HumanXerxes is not online. HumanXerxes
Joined: 17 Apr 2011
Total Posts: 1351
12 Mar 2016 08:07 AM
And yes, since this is a LocalScript, if Filtering was enabled the client's actions would not be replicated to the server. Meaning nobody else would hear the sounds played through the LocalScript, experience an ambient change, etc. - only the player you pressed "n" would.
Report Abuse
real_words is not online. real_words
Joined: 25 Feb 2016
Total Posts: 2184
12 Mar 2016 08:14 AM
first

if game.bb == bb.true return true do
bb = love
print('bb my love let me have yu')
end



yes bb

xdxdx get rik nib il te siksty noscop y0u
Report Abuse
Cartoonfive is not online. Cartoonfive
Joined: 02 Nov 2015
Total Posts: 2105
12 Mar 2016 08:26 AM
Human, id forgot to put the sounds in the script.

Anyways, it works, in studio.

Not in game.
Report Abuse
XlAscensionlX is not online. XlAscensionlX
Joined: 17 Apr 2014
Total Posts: 872
12 Mar 2016 08:26 AM
UserInputService = game:GetService("UserInputService")

cooldown = false

function vision()
if cooldown == false then
cooldown = true
script.activate:Play()
script.beat:Play()
script.Parent.pulse.Disabled = false
script.Parent.static.fuzz.ImageTransparency = 0
player.Walkspeed = 20
wait(0.1)
for i=5,0,-1 do
game.Lighting.Ambient = Color3.new(i/5,1,i/5)
game.Lighting.Brightness = i
wait(.05)
end
game.Lighting.Ambient = Color3.new(0,1,0)
game.Lighting.Brightness = 0
data.infinite.Value = true
data.visionuses.Value = data.visionuses.Value + 1
wait(10)
script.beat:Stop()
game.Lighting.Ambient = Color3.new(0,0,0)
data.infinite.Value = false
script.Parent.pulse.Disabled = true
player.WalkSpeed = 16
script.Parent.static.fuzz.ImageTransparency = 0.7
wait(5)
cooldown = false
end
end

UserInputServicxe.InputBegan:connect(function(input, gameProcessedEvent)
if gameProcessedEvent then return end
if input.KeyCode = Enum.KeyCode.N then
vision()
end
end
end)


~XlAscensionlX [Graphic Design://Animator//Scripter://Developer://]
Report Abuse
XlAscensionlX is not online. XlAscensionlX
Joined: 17 Apr 2014
Total Posts: 872
12 Mar 2016 08:28 AM
I made a typo on the UserInputService function, once you fix that my code should work and be ready to go.


~XlAscensionlX [Graphic Design://Animator//Scripter://Developer://]
Report Abuse
Cartoonfive is not online. Cartoonfive
Joined: 02 Nov 2015
Total Posts: 2105
12 Mar 2016 08:28 AM
Ascension, that just prints a lot of errors i cant seem to fix.
Report Abuse
XlAscensionlX is not online. XlAscensionlX
Joined: 17 Apr 2014
Total Posts: 872
12 Mar 2016 08:30 AM
What errors?


~XlAscensionlX [Graphic Design://Animator//Scripter://Developer://]
Report Abuse
Cartoonfive is not online. Cartoonfive
Joined: 02 Nov 2015
Total Posts: 2105
12 Mar 2016 08:30 AM
09:29:41.418 - Players.Player.PlayerGui.LocalScript:33: attempt to index global 'UserInputService' (a nil value)

Also, you didnt name any of the variables
Report Abuse
XlAscensionlX is not online. XlAscensionlX
Joined: 17 Apr 2014
Total Posts: 872
12 Mar 2016 08:31 AM
I forgot to add these from your original code:

local actionser = game:GetService("ContextActionService")
local data = game.Workspace.data
local mouse = game.Players.LocalPlayer:GetMouse()
player = script.Parent.Parent.Character:WaitForChild("Humanoid")


~XlAscensionlX [Graphic Design://Animator//Scripter://Developer://]
Report Abuse
Cartoonfive is not online. Cartoonfive
Joined: 02 Nov 2015
Total Posts: 2105
12 Mar 2016 08:32 AM
09:32:07.840 - Players.Player.PlayerGui.LocalScript:37: attempt to index global 'UserInputService' (a nil value)
09:32:07.840 - Stack Begin
09:32:07.841 - Script 'Players.Player.PlayerGui.LocalScript', Line 37
09:32:07.841 - Stack End
Report Abuse
XlAscensionlX is not online. XlAscensionlX
Joined: 17 Apr 2014
Total Posts: 872
12 Mar 2016 08:33 AM
Weird, can we TeamCreate so I can fix?


~XlAscensionlX [Graphic Design://Animator//Scripter://Developer://]
Report Abuse
Cartoonfive is not online. Cartoonfive
Joined: 02 Nov 2015
Total Posts: 2105
12 Mar 2016 08:33 AM
uh... idk...
Report Abuse
Cartoonfive is not online. Cartoonfive
Joined: 02 Nov 2015
Total Posts: 2105
12 Mar 2016 08:35 AM
here

http://www.roblox.com/games/381005436/xddd
Report Abuse
Cartoonfive is not online. Cartoonfive
Joined: 02 Nov 2015
Total Posts: 2105
12 Mar 2016 09:12 AM
ok, problem is fixed. thanks everybody
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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