|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 05 Nov 2017 03:48 PM |
no output, nothing prints
print("print()") |
|
|
| Report Abuse |
|
|
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 |
|
|