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: Any idea why this isn't working?

Previous Thread :: Next Thread 
Tickmark is not online. Tickmark
Joined: 26 Jan 2014
Total Posts: 560
25 Jun 2015 04:51 PM
game.Workspace.Part.touched:connected(function()
game.Workspace.Camera.FieldOfView = 1
end)


-
Report Abuse
GeoVolcano is not online. GeoVolcano
Joined: 05 Jul 2012
Total Posts: 1433
25 Jun 2015 04:51 PM
.Touched
Report Abuse
Dynerov is not online. Dynerov
Joined: 21 Jul 2014
Total Posts: 14682
25 Jun 2015 04:52 PM
Is this in a local script?
Report Abuse
Tickmark is not online. Tickmark
Joined: 26 Jan 2014
Total Posts: 560
25 Jun 2015 04:54 PM
still not working.


-
Report Abuse
BigThunderBoy is not online. BigThunderBoy
Joined: 23 Jun 2012
Total Posts: 125
25 Jun 2015 04:54 PM
.Touched and :connect()

like:

part.Touched:connect(function()

end)
Report Abuse
Dynerov is not online. Dynerov
Joined: 21 Jul 2014
Total Posts: 14682
25 Jun 2015 04:55 PM
Well, you cannot change the Workspace's Camera.

You can change the CurrentCamera through a LocalScript, which would change your camera.
Report Abuse
Tickmark is not online. Tickmark
Joined: 26 Jan 2014
Total Posts: 560
25 Jun 2015 04:56 PM



-Oka ty
Report Abuse
seliso is not online. seliso
Joined: 30 Jan 2011
Total Posts: 6443
25 Jun 2015 04:56 PM
is it in a local script?

you can only change someone's camera via local
unless you use remoteevents so like

part.Touched:connect(function(obj)
local player = game.Players:GetPlayerFromCharacter(obj.Parent)
if player then
event:FireClient(player,"CameraChange")
end
end)
Report Abuse
Tickmark is not online. Tickmark
Joined: 26 Jan 2014
Total Posts: 560
25 Jun 2015 04:58 PM
Damn. Still not working.


-
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
25 Jun 2015 05:01 PM
Server-Script in ServerScriptService:

local event = Instance.new("RemoteEvent", game.ReplicatedStorage)
event.Name = "event"

workspace.part.Touched:connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
event:FireClient(player,"CameraChange")
end
end)

LocalScript in StarterGui.

local event = game.ReplicatedStorage:WaitForChild("event")

event.OnClientEvent:connect(function(argument)
if argument == "CameraChange" then
workspace.CurrentCamera.FieldOfView = 1
end
end)

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
UnequaledDonovan1 is not online. UnequaledDonovan1
Joined: 28 Oct 2012
Total Posts: 3909
25 Jun 2015 05:02 PM
Make sure there aren't any more parts named "Part"
Make sure this is in a LocalScript

game.Workspace.Part.Touched:connect(function()
game.Workspace.CurrentCamera.FieldOfView = 1
end)
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
25 Jun 2015 05:03 PM
^

That would make ALL clients get the same effect.

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
UnequaledDonovan1 is not online. UnequaledDonovan1
Joined: 28 Oct 2012
Total Posts: 3909
25 Jun 2015 05:03 PM
@power
why do that when you could just do it a short and simple way
Report Abuse
UnequaledDonovan1 is not online. UnequaledDonovan1
Joined: 28 Oct 2012
Total Posts: 3909
25 Jun 2015 05:09 PM
@power
"LocalScript"
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
25 Jun 2015 05:14 PM
^

Test it then.
When I tested it, whenever that part got touched, by another player, I had the same effects.

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784

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