|
| 11 Sep 2015 03:47 PM |
game.Players.PlayerAdded:connect(function(newPlayer) repeat wait() until newPlayer.Character --Wait until Character is true. print(newPlayer.Name.." has entered the server.") newPlayer.Character.Humanoid.Name = "PlayerCell" local mainGui = script.MainGui:Clone() mainGui.Parent = newPlayer.PlayerGui end)
function ScanRange() for i,v in pairs(game.Players:GetChildren()) do local torso = v.Character.Torso local mouse = v:GetMouse() local crate = game.Workspace:FindFirstChild("Crate") local crateNearby = false local goodRange = 10 local magnitude = (crate.Position - torso.Position).magnitude --print(magnitude,math.abs(magnitude)) if math.abs(magnitude) <= goodRange then crateNearby = true if mouse.Target == crate and crateNearby then crate.Transparency = 1 --To be replaced. else crate.Transparency = 0 --To be replaced. end --print("crateNearby: "..tostring(crateNearby)) elseif math.abs(magnitude) >= goodRange then crateNearby = false crate.Transparency = 0 --To be replaced. --print("crateNearby: "..tostring(crateNearby)) end end end
while true do wait() ScanRange() end |
|
|
| Report Abuse |
|
|
ExpectNeo
|
  |
| Joined: 04 Nov 2013 |
| Total Posts: 272 |
|
|
| 11 Sep 2015 03:49 PM |
i know how to fix this!
go to the scripting forum... |
|
|
| Report Abuse |
|
|
|
| 11 Sep 2015 03:51 PM |
ExpectNeo, I know how to fix your attitude.
Mind your own business unless you can help... |
|
|
| Report Abuse |
|
|
| |
|
|
| 11 Sep 2015 03:56 PM |
| jimmysnow02, The only "v" I see in my script is the one in the for loop and it is lower-case. Is that what you mean? |
|
|
| Report Abuse |
|
|
|
| 11 Sep 2015 03:57 PM |
| idk but ask the scripters forum, seriously (almost) no one on rt knows how to script |
|
|
| Report Abuse |
|
|
|
| 11 Sep 2015 04:02 PM |
| jimmysnow02, yeah I already asked there and nobody is responding. I hate it when people just read your post and you can obviously see that they read it but they aren't giving you any reply whatsoever. It's like why did do I have 10 or more views but nobody wants to speak up? Lol. |
|
|
| Report Abuse |
|
|
how2jdm
|
  |
| Joined: 28 Apr 2013 |
| Total Posts: 1189 |
|
|
| 11 Sep 2015 04:05 PM |
sorry dude, i'm not into scripting :P
roblox 1991 was the best/@jermaisglueman |
|
|
| Report Abuse |
|
|
|
| 11 Sep 2015 04:07 PM |
| did you bump it, or post in game design instead |
|
|
| Report Abuse |
|
|
|
| 11 Sep 2015 04:08 PM |
Use the ":WaitForChild()" in your locals. the same problem has been happening to me and when I use it it works. |
|
|
| Report Abuse |
|
|
|
| 11 Sep 2015 04:08 PM |
| I posted in Scripters Forum, not Game Design forum. |
|
|
| Report Abuse |
|
|
Hakupa
|
  |
| Joined: 03 Sep 2011 |
| Total Posts: 5375 |
|
|
| 11 Sep 2015 04:11 PM |
what tedd said also sometimes if you have the simple wait() loops it can be buggy online so maybe u could try a coroutine or something |
|
|
| Report Abuse |
|
|