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 » Game Design
Home Search
 

Re: First player to join doesn't have working scripts

Previous Thread :: Next Thread 
Justun400 is not online. Justun400
Joined: 06 Aug 2008
Total Posts: 48
12 Sep 2017 05:55 PM
When the first player joins they cant use their tool. It just straight up does not work. But everyone who joins from there on out, their tool does work. here are the tool's local and regular scripts.

========================================================================================


Script
---------------------------------------------------------------
wait(2)
local Tool = script.Parent
play = Tool.Parent.Parent
char = play.Character
hum = char.Humanoid

local en = true


Tool.RemoteEvent.OnServerEvent:connect(function(play,mousehit)
local a = hum:LoadAnimation(Tool.Throw)
a:Play()
wait(0.5)
local fireball = Tool.Handle:clone()
fireball.Position = Tool.Handle.Position
local bv = Instance.new("BodyVelocity")
bv.MaxForce = Ve######################## bv.Velocity = mousehit.lookVector * 500
bv.Parent = fireball
fireball.CanCollide = false
fireball.Parent = game.Workspace
game.Debris:AddItem(fireball,4)
local ten = true
fireball.Touched:connect(function(hit)
if not ten then return end
ten = false
local ehum = hit.Parent:findFirstChild("Humanoid") or hit.Parent.Parent:findFirstChild("Humanoid")
if ehum and ehum ~= hum then
hit.Parent.Torso.Velocity = Vector3.new(mousehit.lookVector.x * 100,0,mousehit.lookVector.z * 100)
elseif hit.Anchored == true and hit.CanCollide == true then
for i=1,1 do
# local part = Instance.new("Explosion")
part.BlastPressure = 0
# # pa################ 0
part.DestroyJointRadiusPercent = 0
part.Position = fireball.Position
--part.BodyVelcoity.MaxForce = Vector3.new(1e8,0,1e8)
part.Parent = game.Workspace
end
end
wait()
ten = true
end)
end)


=======================================================================================


LocalScript
---------------------------------------------------------
local Tool = script.Parent
play = game.Players.LocalPlayer
local mouse = play:GetMouse()
char = workspace:WaitForChild(play.Name)
hum = char.Humanoid
root = char.HumanoidRootPart


local en = true
Tool.Activated:connect(function()
if not en then return end
en = false
Tool.RemoteEvent:FireServer(mouse.Hit)
wait(0.5)
en = true
end)
Report Abuse
Justun400 is not online. Justun400
Joined: 06 Aug 2008
Total Posts: 48
12 Sep 2017 06:42 PM
Update: Just the owner can't join. The owner does not have working scripts.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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