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: My toaster is hitting me?

Previous Thread :: Next Thread 
JarheadTech is not online. JarheadTech
Joined: 05 Oct 2015
Total Posts: 310
28 Nov 2016 02:53 PM
(Don't ask about the title, my friend and I are working on a game that uses as toasters as weapons and they fire toast instead of bullets. It is a strange idea.)

Me and my friend recently started working on a game, and in order for it to work I had to script a weapon. It is working almost perfectly, except for one issue. The projectile is hitting the person firing it. There are no errors in the console, and this is the part of the script that should run when the toaster is fired.

tost.Touched:connect(function(hit)
if hit.Parent ~= char and hit.Parent ~= script.Parent then
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
hum:TakeDamage(25)
end
tost:Destroy()
end
end)

I recorded a video that shows what happens when I test it in studio, and then what happens in the actual game.
https://www.youtube.com/watch?v=Wvz6x49VIxo
Report Abuse
JarheadTech is not online. JarheadTech
Joined: 05 Oct 2015
Total Posts: 310
28 Nov 2016 03:26 PM
Any ideas for how to fix this?
Report Abuse
JarheadTech is not online. JarheadTech
Joined: 05 Oct 2015
Total Posts: 310
28 Nov 2016 09:02 PM
The title of this thread is strange now that I think about it.
Report Abuse
JarheadTech is not online. JarheadTech
Joined: 05 Oct 2015
Total Posts: 310
30 Nov 2016 11:03 PM
I seriousely don't know whats wrong with the toaster.
Report Abuse
cbsqueast is not online. cbsqueast
Joined: 16 Apr 2011
Total Posts: 6784
30 Nov 2016 11:10 PM
go onto the scripters forum pls

most of us aren't the people to talk about this kind of stuff


You're gonna clean your home in a quicky, when you use your Schticky.
Report Abuse
cbsqueast is not online. cbsqueast
Joined: 16 Apr 2011
Total Posts: 6784
30 Nov 2016 11:13 PM
i hope you fix ur toaster man

my poptart shot out of my toaster and it scared me very badly


You're gonna clean your home in a quicky, when you use your Schticky.
Report Abuse
sc4rydev is not online. sc4rydev
Joined: 06 Nov 2015
Total Posts: 421
30 Nov 2016 11:17 PM
This is obvious.. The projectile is being created where the toaster is from what I see, therefore touching your character's arm. making you take damage and deleting it. You need to have the projectile created at an offset from the lookvector.


Report Abuse
ColinRocks99 is not online. ColinRocks99
Joined: 04 May 2013
Total Posts: 1533
01 Dec 2016 06:26 AM
You forgot to connect it to the humanoid.
Report Abuse
ColinRocks99 is not online. ColinRocks99
Joined: 04 May 2013
Total Posts: 1533
01 Dec 2016 06:28 AM
Wait nvm... I still don't see how the script runs without the connection but I guess it does.


Try offsetting the toast by 2.14 studs infront of the characters arm.
Report Abuse
JarheadTech is not online. JarheadTech
Joined: 05 Oct 2015
Total Posts: 310
03 Dec 2016 05:41 PM
I'll try setting the offset
Report Abuse
JarheadTech is not online. JarheadTech
Joined: 05 Oct 2015
Total Posts: 310
06 Dec 2016 10:31 PM
Its no longer an issue, we got it figured out. I am going to take 100% of the credit for the solution even though it was my friend's idea. jk :P
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