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: Is this a glitch???

Previous Thread :: Next Thread 
lumberlegend123 is not online. lumberlegend123
Joined: 15 Aug 2016
Total Posts: 111
13 Sep 2017 02:38 PM
I wanted to make a part that Rises and Kills any player that touches it, So I made this script

script.Parent.Touched:connect(function(hit)
local player = hit.Parent:FindFirstChild("humanoid")
if player ~= nil then
player.Health = 0
end
end)

while true do
script.Parent.Size = script.Parent.Size + Vector3.new(0.3,0,0)
wait(.1)
end

It works, but when I add the script that kills whoever touches the part, It messes up, When I add the script to the part, the part does not come in contact with me, whenever I touch it, it does not let me go through it, to understand the problem better recreate it

Step 1. make a part that has its CollisionGroupId set to 1 then set its CanCollide option to False then unAnchor it then set its bottomSurface to Inlet and the rest to smooth

Step 2. put a script inside of the Part and copy and past the script I wrote into it and don't change anything

Step 3. Try it with the Touch script then Try it without the Touch script and see what happens






Report Abuse
he_ro is online. he_ro
Joined: 08 Jun 2013
Total Posts: 634
13 Sep 2017 02:49 PM
shot in the dark here, but try

spawn(function()
while wait(.1) do
script.Parent.Size = script.Parent.Size + Vector3.new(0.3,0,0)
end
end)


Report Abuse
iiNemo is online. iiNemo
Joined: 22 Jul 2013
Total Posts: 2380
13 Sep 2017 02:50 PM
if the loop is above the touched event, then the guy above has the right answer.
Report Abuse
lumberlegend123 is not online. lumberlegend123
Joined: 15 Aug 2016
Total Posts: 111
13 Sep 2017 02:54 PM
where does the script go



Report Abuse
he_ro is online. he_ro
Joined: 08 Jun 2013
Total Posts: 634
13 Sep 2017 02:56 PM
same place you had it before


Report Abuse
lumberlegend123 is not online. lumberlegend123
Joined: 15 Aug 2016
Total Posts: 111
13 Sep 2017 02:57 PM
but it don't kill the player when he touches it



Report Abuse
he_ro is online. he_ro
Joined: 08 Jun 2013
Total Posts: 634
13 Sep 2017 02:59 PM

local player = hit.Parent:FindFirstChild("Humanoid")

capital h


Report Abuse
Mitko0o1 is not online. Mitko0o1
Joined: 30 Nov 2010
Total Posts: 5725
13 Sep 2017 03:00 PM
spawn(function()
while wait(.1) do
script.Parent.Size = script.Parent.Size + Vector3.new(0.3,0,0)
end
end)

script.Parent.Touched:Connect(function(hit)
local player = hit.Parent:FindFirstChild("Humanoid") or hit.Parent.Parent:FindFirstChild("Humanoid")
if player ~= nil then
player.Health = 0
end
end)

you forgot to capitalize "Humanoid", also made it work if it gets touched by a hat or a tool


help me: https://www.roblox.com/library/1032745459/Support-me-buying-a-russian-cap
Report Abuse
lumberlegend123 is not online. lumberlegend123
Joined: 15 Aug 2016
Total Posts: 111
13 Sep 2017 03:00 PM
script.Parent.Touched:connect(function(hit)
local player = hit.Parent:FindFirstChild("Humanoid")
if player ~= nil then
player.Health = 0
end
end)
spawn(function()
while wait(.1) do
script.Parent.Size = script.Parent.Size + Vector3.new(0.3,0,0)
end
end)

is this right



Report Abuse
he_ro is online. he_ro
Joined: 08 Jun 2013
Total Posts: 634
13 Sep 2017 03:00 PM
yep


Report Abuse
lumberlegend123 is not online. lumberlegend123
Joined: 15 Aug 2016
Total Posts: 111
13 Sep 2017 03:03 PM
The same thing happens, it kills the player but glitches


Report Abuse
lumberlegend123 is not online. lumberlegend123
Joined: 15 Aug 2016
Total Posts: 111
13 Sep 2017 03:04 PM
do it in edit mode and follow my steps


Report Abuse
NexanianStudios is online. NexanianStudios
Joined: 16 Jul 2016
Total Posts: 1109
13 Sep 2017 03:09 PM
Changing the size really close to doing other stuff can be bad

For example, if i were to set the size of a bullet, then add the force directly after it, it would just float in midair.

Try another method other than sizing it
Report Abuse
lumberlegend123 is not online. lumberlegend123
Joined: 15 Aug 2016
Total Posts: 111
13 Sep 2017 03:12 PM
what do you suppose I do, add a wait between the Touch and Size script??


Report Abuse
lumberlegend123 is not online. lumberlegend123
Joined: 15 Aug 2016
Total Posts: 111
13 Sep 2017 03:13 PM
at this point im willing to pay someone if they help me


Report Abuse
NexanianStudios is online. NexanianStudios
Joined: 16 Jul 2016
Total Posts: 1109
13 Sep 2017 03:13 PM
Try lerping it out of the ground
Report Abuse
lumberlegend123 is not online. lumberlegend123
Joined: 15 Aug 2016
Total Posts: 111
13 Sep 2017 03:14 PM
Lerp???



Report Abuse
NexanianStudios is online. NexanianStudios
Joined: 16 Jul 2016
Total Posts: 1109
13 Sep 2017 03:16 PM
Linear interpolation, it's a function to move something from point a to b

http://wiki.roblox.com/index.php?title=CFrame#Methods
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