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: What does this mean?

Previous Thread :: Next Thread 
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 09:49 AM
LoadCharacter can only be called by the backend server

I used a loadcharacter in a local script
Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 09:50 AM
and what would be the alternative to respawn some1
Report Abuse
Vercron is not online. Vercron
Joined: 18 Sep 2010
Total Posts: 9418
04 Mar 2017 09:55 AM
you can use a remoteevent to do it


Report Abuse
iiJameul is not online. iiJameul
Joined: 11 Feb 2017
Total Posts: 85
04 Mar 2017 09:56 AM
You cannot use a server function in a local script. For what you are trying you must state the local player in a script and if you would like to to resplendent the player in a local script just kill the player.

68% of people cannot script that 1% is me.
Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 09:57 AM
rip how i dont know how to use remoteevents
Report Abuse
Vercron is not online. Vercron
Joined: 18 Sep 2010
Total Posts: 9418
04 Mar 2017 09:57 AM
SCRIPT1
-- creating remote event

local event1 = Instance.new("RemoteEvent")
event1.Name = "MyEventName"
event1.Parent = game.ReplicatedStorage


now this part is within your local script assuming you have a gui with a button
LOCAL SCRIPT1
-- using that remote event
script.Parent.MouseButton1Click:connect(function(hit)
game.ReplicatedStorage.MyEventName:FireServer()
end)

now this is back in the script
SCRIPT1

event1.OnServerEvent:connect(function()
do stuff
end)







Report Abuse
Vercron is not online. Vercron
Joined: 18 Sep 2010
Total Posts: 9418
04 Mar 2017 10:01 AM
what are you trying to make first of all :p


Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 10:04 AM
a team change gui

Report Abuse
Vercron is not online. Vercron
Joined: 18 Sep 2010
Total Posts: 9418
04 Mar 2017 10:06 AM
And you want to make the player respawn when they change teams?



Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 10:06 AM
I have a "MyEventName" remote event in replicated storage,

if player.TeamColor == BrickColor.new("Royal purple") then
game.ReplicatedStorage.MyEventName:FireServer()
end


and the script

local event1 = Instance.new("RemoteEvent")
event1.Name = "MyEventName"
event1.Parent = game.ReplicatedStorage

event1.OnServerEvent:connect(function()
print("hi")
end)


and its not printing hi rip
Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 10:07 AM
Yeah ^^
Report Abuse
Vercron is not online. Vercron
Joined: 18 Sep 2010
Total Posts: 9418
04 Mar 2017 10:10 AM
if player.TeamColor == BrickColor.new("Royal purple") then
game.ReplicatedStorage.MyEventName:FireServer()
end

have you defined player?


Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 10:10 AM
yeah

local player = game.Players.LocalPlayer
Report Abuse
Vercron is not online. Vercron
Joined: 18 Sep 2010
Total Posts: 9418
04 Mar 2017 10:13 AM
did you put the local script into the backpack?

and what does this print out

player = game.Players.LocalPlayer
print(player.TeamColor)



Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 10:14 AM
what i have
(local script)
local player = game.Players.LocalPlayer


if player.TeamColor == BrickColor.new("Royal purple") then
game.ReplicatedStorage.MyEventName:FireServer()
end


(regular script)

local event1 = Instance.new("RemoteEvent")
event1.Name = "MyEventName"
event1.Parent = game.ReplicatedStorage

event1.OnServerEvent:connect(function()
print("hi")
end)


Then a remote event called "MyRemoteEvent" in replicated storage
Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 10:15 AM
the local script is inside of a frame in startergui
Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 10:16 AM
it prints "Royal purple"
Report Abuse
Vercron is not online. Vercron
Joined: 18 Sep 2010
Total Posts: 9418
04 Mar 2017 10:21 AM
The local script that calls the remotefunction has to be in the backpack


Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 10:25 AM
starterpack?

Report Abuse
Vercron is not online. Vercron
Joined: 18 Sep 2010
Total Posts: 9418
04 Mar 2017 10:26 AM
ye sorry starterpack


Report Abuse
Vercron is not online. Vercron
Joined: 18 Sep 2010
Total Posts: 9418
04 Mar 2017 10:30 AM
/31584d248f0c041385d14483e5c5c4c8

like this


Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 10:39 AM
k lemme try
Report Abuse
CakeCopLmao is not online. CakeCopLmao
Joined: 05 Nov 2016
Total Posts: 923
04 Mar 2017 10:41 AM
####
Report Abuse
Externalization is online. Externalization
Joined: 21 Aug 2013
Total Posts: 13230
04 Mar 2017 10:43 AM
in a local script in starterpack

local player = game.Players.LocalPlayer


if player.TeamColor == BrickColor.new("Royal purple") then
game.ReplicatedStorage.MyEventName:FireServer()
end


in a regular script in workspace

local event1 = Instance.new("RemoteEvent")
event1.Name = "MyEventName"
event1.Parent = game.ReplicatedStorage

event1.OnServerEvent:connect(function()
print("hi")
end)


does n0thinggg rip
Report Abuse
Vercron is not online. Vercron
Joined: 18 Sep 2010
Total Posts: 9418
04 Mar 2017 10:45 AM
just sec ill set up an empty game with the setup in it so you can edit it and see what has to go where


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