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: help

Previous Thread :: Next Thread 
stephenthefox is not online. stephenthefox
Joined: 11 Mar 2011
Total Posts: 1123
15 Aug 2016 01:10 PM
This only prints Boat started but doesnt do anything else... Can i get some help? (Nothing is in the outputs besides Boat started

Admins = {15295651}
game.Players.PlayerAdded:connect (function(plr)
player = plr
end)
script.Parent.MouseButton1Down:connect(function()
print("Boat Started")
for _,v in ipairs(Admins) do
if player.UserId ~= v then return end
if player.UserId == v then
print("Admin Clicked it")
wait(5)
game.Workspace.MovingBoat.Horn:Play() wait(2.81)
game.Workspace.MovingBoat.Horn:Play() wait(2.81)
game.Workspace.MovingBoat.Horn:Play()
wait(5)
game.Workspace.MovingBoat.Boat:Play()
if workspace.MovingBoat.GoingDown.Value == true or workspace.MovingBoat.GoingUp.Value == true then return end
if workspace.MovingBoat.Up.Value == true then
workspace.MovingBoat.GoingDown.Value = true
for i= 1,600000000000 do
lol = workspace.MovingBoat.Model.MoveParts:GetChildren()
for b = 1, #lol do
if lol[b].className == "Part" or "Union" or "Model"then
lol[b].CFrame = lol[b].CFrame + Vector3.new(-1,0,0)
end
end
wait(0.0001)
end
workspace.MovingBoat.GoingDown.Value = false
workspace.MovingBoat.Up.Value = false
workspace.MovingBoat.Down.Value = true
end
end
end
end)


Report Abuse
stephenthefox is not online. stephenthefox
Joined: 11 Mar 2011
Total Posts: 1123
15 Aug 2016 01:32 PM
bump


Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
15 Aug 2016 01:36 PM
is this in a local script or script and where is it parented to?
Report Abuse
stephenthefox is not online. stephenthefox
Joined: 11 Mar 2011
Total Posts: 1123
15 Aug 2016 01:46 PM
A script.


Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
15 Aug 2016 01:48 PM
if this is parented to a descendant of the player, it needs to be in a local script
Report Abuse
stephenthefox is not online. stephenthefox
Joined: 11 Mar 2011
Total Posts: 1123
15 Aug 2016 01:50 PM
Its not parented to any players. It moving an object on click... But I only want it to work if an admin clicks it


Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
15 Aug 2016 01:53 PM
"game.Players.PlayerAdded:connect (function(plr)
player = plr
end)
"

this sets player to the most recent player to join the game

because player is not an argument of MouseButton1Down, you need to create individual surface GUIs for every player, parent it to the playergui, and set the Adornee to whatever part you want

that way you can use the localplayer as your player argument
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