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: remoteevent problems

Previous Thread :: Next Thread 
yhatayhatahoohoo is not online. yhatayhatahoohoo
Joined: 19 Jan 2011
Total Posts: 1988
05 Nov 2017 03:24 PM
localscript simply not working in online mode localscript: function forceFieldFunc() game:GetService("UserInputService").InputBegan:connect(function(input, gpe) if input.KeyCode == Enum.KeyCode.F then if forceFieldToggle == true then forceFieldToggle = false print("Force Field Off") forceField.Transparency = # ###### ################ == false then forceFieldToggle = true print("Force Field On") forceField.Transparency = 0.6 repeat wait() char.Humanoid.Health = char.Humanoid.MaxHealth until forceFieldToggle == false end elseif input.KeyCode == Enum.KeyCode.V then char.Humanoid:TakeDamage(60) end end) end --Force Field Toggle -- remote.OnClientEvent:Connect(forceFieldFunc) server script: local repStorage = game:GetService("ReplicatedStorage") local remote = repStorage:WaitForChild("ForceFieldEvent") remote:FireAllClients() print("print()")
Report Abuse
yhatayhatahoohoo is not online. yhatayhatahoohoo
Joined: 19 Jan 2011
Total Posts: 1988
05 Nov 2017 03:25 PM
serverscript:

local repStorage = game:GetService("ReplicatedStorage")
local remote = repStorage:WaitForChild("ForceFieldEvent")

remote:FireAllClients()

localscript:

function forceFieldFunc()
game:GetService("UserInputService").InputBegan:connect(function(input, gpe)
if input.KeyCode == Enum.KeyCode.F then
if forceFieldToggle == true then
forceFieldToggle = false
print("Force Field Off")
forceField.Transparency = robloxcensor
elseif forceFieldToggle == false then
forceFieldToggle = true
print("Force Field On")
forceField.Transparency = robloxcensor
repeat
wait()
char.Humanoid.Health = char.Humanoid.MaxHealth
until forceFieldToggle == false
end
elseif input.KeyCode == Enum.KeyCode.V then
char.Humanoid:TakeDamage(60)
end
end)
end
--Force Field Toggle --

remote.OnClientEvent:Connect(forceFieldFunc)


print("print()")
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
05 Nov 2017 03:33 PM
"localscript simply not working in online mode"

If you're not going to put any effort into asking a particular question, I ain't gonna put my effort into pondering your entire script to find it and fix it

Let us know what happens in the output, which line the script gets to before prints stop giving proper information, etc
Report Abuse
yhatayhatahoohoo is not online. yhatayhatahoohoo
Joined: 19 Jan 2011
Total Posts: 1988
05 Nov 2017 03:48 PM
no output, nothing prints



print("print()")
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
10 Nov 2017 07:34 PM
I hope that wasn't your entire server script, cuz it only fires all clients once when it starts, and then never again.
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