generic image
Processing...
  • Games
  • Catalog
  • Develop
  • ROBUX
  • Search in People
  • 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
 

Remote event to give player name not wanting to fire

Previous Thread :: Next Thread 
XXXlawsonXXX is online. XXXlawsonXXX
Joined: 25 Nov 2011
Total Posts: 6
15 Jul 2017 09:51 PM

I am trying to make a system to change the player's house to a better one once they have the correct amount of money, but when I play the game to test it, it doesn't clone the house and set its parent to the house-in-game folder under the workspace.

Here is the code to check the money of the player (It's a localscript)

while(loop==true) do
local money = game.Players.LocalPlayer.leaderstats.Money.Value
if game.Players.LocalPlayer.leaderstats.Money.Value > 0 and
game.Players.LocalPlayer.leaderstats.Money.Value < 3000 then
local player = game.Players.LocalPlayer
wait(1)
game.ServerScriptService.addHouse.Adder:FireServer()
end
end
And here is the code for the server script

script.Adder.OnServerEvent:connect(function(player)
local homeloc = player.Homeloc.Value
local Home = game.Workspace.HouseScripts.Houses.Crate:Clone()
Home.Parent = game.Workspace.HouseScripts.HouseInGame
Home:MoveTo(Vector3.new(player.Homeloc.Value))
end)


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.

Thanks for playing ROBLOX

  • 1

    Click RobloxPlayer.exe to run the ROBLOX installer, which just downloaded via your web browser.

  • 2

    Click Run when prompted by your computer to begin the installation process.

  • 3

    Click Ok once you've successfully installed ROBLOX.

  • 4

    After installation, click Play below to join the action!

    Play
The ROBLOX installer should download shortly. If it doesn’t, start the download now.
generic image