|
| 11 Mar 2016 05:17 PM |
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)
When i actually play the game from the website nothing happens when i press n, and i cant see whats wrong. In studio it works and doesnt print any errors. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 11 Mar 2016 05:43 PM |
| i just want to know why nothing is happening |
|
|
| Report Abuse |
|
|
| |
|
AviatorEU
|
  |
| Joined: 27 Dec 2015 |
| Total Posts: 62 |
|
|
| 11 Mar 2016 07:18 PM |
I think it's because a lightingvalue can't be changed from startergui or the client.
try this
--script in workspace local event = Instance.new("RemoteFunction",game.Workspace) event.Name = "CreationOfWhatever" function event.OnServerInvoke() 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
--in the gui
local data = game.Workspace.data local mouse = game.Players.LocalPlayer:GetMouse() player = script.Parent.Parent.Character:FindFirstChild("Humanoid") local event = game.Worksapce:WaitForChild"CreationOfWhatever"
cooldown = false
function event() event:InvokeServer() end
end mouse.KeyDown:connect(function(pressed) pressed = pressed:lower() if pressed == "n" then event() end end)
|
|
|
| Report Abuse |
|
|
|
| 11 Mar 2016 08:02 PM |
You need to wait for the Character to load. Check the output dude.
|
|
|
| Report Abuse |
|
|
|
| 11 Mar 2016 09:26 PM |
Jared, i press the key like 20 seconds after the game has loaded and nothing happens. And i already said, im trying this in game from the website, im not testing in studio. Please read the thread.
And the person who posted a different version, it did not work, but thanks for the help. >.> Ive made other scripts just like this one and theyve worked fine. IDK what the problem is. |
|
|
| Report Abuse |
|
|